Donate SIGN UP

How exactly does bittorrent work?

Avatar Image
nano | 16:11 Sun 20th Jan 2008 | Technology
10 Answers
I don't understand the process of this thing. Why does it download all over the place instead of in a logical order from beginning to end?
Gravatar

Answers

1 to 10 of 10rss feed

Best Answer

No best answer has yet been selected by nano. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
You could argue why download from begining to end when you can download from all over the place.

Bittorent works by downloading a file from lots of people's PCs. It does it by downloading pieces (Bits) from different PCs and joining them all up together afterwards.

It can download parts of a file from someone's PC, even if they have not got the whole file on their PC.

So by being able download any part of the file (beginning, middle, and end) it makes it far more flexible.

more...
Question Author
ok. thanks.
continued

Just to explain a bit more.

Bittorrent works by people being Seeders (providing the file to those that want it - the Leechers).

The more Seeders there are the quicker the file can be downloader and it can turn Leechers into Seeders.

Suppose Seeder1 (the only seeder) is offering the file to download.

Suppose the Bittorrent program ONLY downloaded the start of the file to all the Leechers.

These Leechers can then start Seeding the file (even though they only have part of it).

more....
continued

But the Leechers have only got the start of the file (because as I said above, that is the way the Bittorrent worked) so there is no one to seed it to.

Surely it is better for the Bittorrent program to download all the parts of the file (begining, middle, and end) to different Leechers.

Then the Leechers who have the start can Seed that to those that haven't got the Start.

The Leechers who have the middle can seed that to those who have not got the middle.

And the Leechers who have the end can seed that to those that haven't.

This method means that Leechers can start to be productive Seeders much earlier in the process and take the strain off the original Seeder.
Question Author
I sort of get it. Why does a download sometimes stop and not start again?
Problem:

Downloading stuff costs the person you're download from money. Suppose you are downloading a file from Microsoft. Some update to windows or something. It's 10 MB in size.

Their server can upload (send you) stuff at up to 100MB per second (they have a fast connection!). If you download that file, you'll get it up to 100MB/s, or as fast as your internet connection will let you download (very likely nowhere near that!).

But if 10 people were to download that file, you'd each get an upload rate of 10MB (the 100MB split evenly). Imagine if 1000 people were download the file at once (it is Microsoft after all). That's an upload rate of 0.1MB/s, or 100KB/s. Being Microsoft, it may be more realistic to think of 10,000 people download that file -- you'll each get an upload rate of 10KB/s from their servers. This means that no matter how fast your connection is to the internet (2Mb or whatever), you'll only be downloading the file at 10KB.

This means that you get a slow download. It also means that Microsoft gets charged a lot of money from their server hosts for uploading so much data (just as you'd get charged a lot if you used a lot of water). You have a water meter, server hosts have a bandwidth meter.

This is a disadvantage for everyone.
Solution:

BitTorrent!

People (including Microsoft's own server) that have a complete copy of the file are called seeders.

People with an incomplete copy (including yourself if you've just started downloading it) are called leechers.

When you download via BitTorrent, you download from a torrent server. This could, for example, be operated by Microsoft. It's a computer that watches everyone downloading and sorts things out -- like a teacher in front of a class organising the kids.

So, instead of downloading this big file from Microsoft, everyone downloads a small torrent file from Microsoft. This will be 10kB, instead of something like 10MB -- a thousand times smaller. Because it's so much smaller, Microsoft pay less for their hosting bill, and you get that file downloaded faster from them.

Now, this torrent file gives the details of the file you're actually trying to download (the 10MB one I was talking about originally), as well as which server is running the show (the Microsoft one). So you open this torrent file in your favourite BitTorrent client -- muTorrent, Azureus, Transmission, etc. This client now knows that you want to download a 10MB file from the Microsoft servers.

But, and here's the clever part -- Microsoft's torrent server knows who else has copies (partial or complete) of the file. The Microsoft server will tell your client software to download from itself, as well as some others that have parts of the file. So you might download the first tenth of the file from Microsoft, the last bit from some guy in Germany, some other part from your neighbour next door, etc.

Because you're downloading from several people, on different pipes, you can download faster than from just one server, and that one server can spread their costs over many people. It works both ways.
Now to answer your actual question, why download all over the place?

Instead of seeing your file as just one file, it sees it as many little bits of the file. This is the way BitTorrent works. The server you're using then will send you some bits of the file. It'll tell someone else to send you some other bits. It doesn't care that you get it in precise order, because it doesn't need to. You can only use the file once it's complete anyway. So it'll have given someone else the last tenth of the file, for example. This person can then send you those last tenth bits, because that's all they have. But you have the first tenth too, so you can send them that first tenth. In the end, you both have the first and last tenth of the file -- without having to download everything from Microsoft.

My example isn't amazing. Microsoft is quite rich enough to pay for its own hosting needs. And I'm unaware of any big BitTorrent server that it has. But this is great for small starting companies. They can't afford big hosting bills, so BitTorrent helps them.
Why stop and not start again:

Sometimes, a seeder will put a file out to the world.

People will start downloading it -- like yourself.

Then for whatever reason, this person will stop seeding.

So there'll be people with 68% of the file, some with 10%, some 37%, etc. Bit if the person with 100% of the file isn't there anymore to keep seeding, then you'll never get the entire file.

Instead, the torrent server will build each of you up to the highest person's level, 68% for instance.

Hopefully, someone with 100% of the file will begin seeding again, and you can all download the rest. Once someone else has got 100% of the file, you can all download from those 2 people. Then if one of those gets disconnected for some reason, at least the other is there to keep seeding. Eventually, more and more people get 100% of the file.

This is why BitTorrent works best with lots of people. Some obscure file that you share over BitTorrent won't work as well as, for example, the Windows OpenOffice BitTorrent download.
Question Author
Thanks. I understand the process a lot better now.

1 to 10 of 10rss feed

Do you know the answer?

How exactly does bittorrent work?

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.