Why BitTorrent Works
Written by Ernesto on September 04, 2006BitTorrent is often referred to as the best filesharing protocol for sharing large files. But why? What makes BitTorrent so unique?
Well, lets take a sneak peek under the hood of your BitTorrent client, and list a couple of features that make BitTorrent as fast, stable, and robust as it is.
How it all Starts
BitTorrent starts with chopping a file into small pieces, the person who starts sharing the file (initial seed) sends those small pieces to available peers in the swarm. The BitTorrent protocol makes sure that the seed sends a unique piece to everyone, so they can immediately exchange these pieces with each other.
Thus, the great advantage is that everyone starts sharing pieces of the file right away.
Fair trading
Once you have a little piece of the file, your BitTorrent client tries to find other people who might be interested in the pieces you have. The BitTorrent protocol works as a tit-for-tat game, you only upload pieces to people who offer something to you. The more you upload to others, the more you receive.
This fair trading principle prevents free-riders from stealing your precious bandwidth.
Once you’re trading pieces with someone, the BitTorrent client keeps a close eye on this peer, as soon as the other side stops sending you data it will stop sending as well (choke). In the meantime, your client keeps searching for other peers It randomly sends data to peers who are interested (optimistic unchoke) to see if that peer is a potential trading partner.
Selecting pieces
So what pieces does your client sent first? Well, BitTorrent works with a “rarest piece first” scheme. Your BitTorrent client generally looks for the rarest piece that’s available among the peers in the swarm. This makes sure that the most common pieces are still available at the end and may prevent people from getting stuck at 99%.
Seeders & New Peers
Seeders don’t stop sending out pieces of course, but the rules change a bit. As a downloader the client determines the best peer by the upload/download ratio. A seeder however is only interested in peers with a high upload speed, so these fast uploaders can send the pieces to other peers, and speed up the overall speed of the swarm (seeds + peers).
New peers (without pieces) are more likely to receive a piece of the file at random. Besides this, new peers are not bound to the rarest piece first restriction. This makes sure that a new peer receives a “piece” as quick as possible, so he can share it with others.
This is a brief, and simplified outline of some features that aid to the success of the BitTorrent protocol.
Previously: Mac BitTorrent Clients Reviewed
Next: uTorrent portable


32 Responses (Add yours or TrackBack)
Pages: [1] 2 » Show All
Sweet Sweet
Is there any “minute” quality loss while movies and music are broken into bits and put back together?
No, no loss at al, it is an exact copy of the original
Wow, thanks for this simplified insight into the BitTorrent protcol.
I am amazed at how democratic the whole process of file-sharing over BT actually is! Maybe even more fair and equal than our legal systems. The concept of the swarm and making sure it as a whole benefits, rather than individuals, is something I believe is essential to BitTorrent’s success.
Smaran,
one problem with this “democracy” is; it allows also bullies on the schoolyard.
On the BitTorrent schoolyard those bullies are named BitComet.
BitComets “lie” to other peers, hammers the Seeders, disobey the commands regarding the connection from other peers ect.
So if someone is using a Windows Operating System he should not act like a bully and should NOT use BitComet. There are swarmfriendly alternatives out there; for example µTorrent (www.utorrent.com)
Haha Kdsde ;)
That’s brilliant
bitComet is not a bully, it is just smarter about completing files fast, so the more bitComets in a swarm, the faster files go to completion. it is up to the individual then to continue seeding.
Azureus follows a bit less “completionist” approach, it instead makes extensive use of DHTs and magnet links to operate a parallel “Azureus network” specific to the file being shared in addition to the bittorrent based public network.
Azureus likes plug-ins and can be tweaked indefinitely, while bitComet believes in a small footprint & unique features that make life easier, e.g capturing, managing & accelerating all downloads, not just torrents. putting a translucent floating vwindow, creating cometzone & flvconverter. I first used bittorrent official client (boring but up-to-date protocol) bitcomet for the longest time (updates are extremely slow dowloads from download.com, get it from filehippo if you must), now I use Azureus (a resource hog, but very customizable, nice plugins)
Azureus is meant for people with 512+ MB RAM, Pentium-M/Core|2/Turion,Athlon64X2 line of processors, XP or higher. I think it also works in gnu/linux distros & macs. bitComet is Windows only, simplistic (not minimalist), works with 128+ MB RAM, Celeron/Sempron or higher.
uTorrent has the tiniest memory & processor use, but it has monitoring technology in the backend inspected by RIAA.
The real bully is bitLord
“uTorrent has the tiniest memory & processor use, but it has monitoring technology in the backend inspected by RIAA.”
What the hell are you smoking? uTorrent is one of the best BT clients out there.
Don’t pull stupid shit out of your ass.
share your files with outer space–
spread life in space.
you can upload your file give it a name and a link to your site blog..
http://www.beinspace.com
Hey robi, it’s clear you didn’t understand what he was saying. “tiniest memory & processor use” is a good thing. Thanks for jumping in and being really rude, though.
ascii king: i think robi was referring to _||_’s claims about the RIAA, not the stuff about the processor and memory usage. I don’t know how right both of them are about that though.
thanks for the great info on torrents, it was really usefull
what the hell is this torrent file all about.. i cant just wait to see it disappears
bluezeski: The torrent file is an essential part of the bittorrent protocol. It contains information about the data you want to download as well as an address to a server (called the tracker) to which it can connect to retrieve a list of people (called peers) that has parts of the data you want.
thanks for this simplified insight
http://www.muziekpedia.com/songteksten/y/yellowcard/index.php
i think the utorrent rumour was quashed a long time ago. its safe. the code has been inspected.
any clients that ‘bully’ are exploiting the protocol.
the protocol is a work of near genius that (although I suspect inspired by) matches TCP/IP.
9 references to this post
Pages: [1] 2 » Show All
Add your response