Christopher Taylor takes a look at the program responsible for the lion's share of the world's bandwidth.
If you’ve so much as glanced at the news section of a computing magazine in the past couple of years, you’ve probably heard about BitTorrent, the current darling of file sharers (legitimate and otherwise) alike.Sure, it's a neato P2P file sharing application, but just how does it work its revolutionary magic, and what sets it apart from other P2P tools?
Caring and sharingBasically, BitTorrent is an application layer network protocol (like POP3) that allows for the distribution of files without the need for massive bandwidth resources, something that’s a blessing for open source developers and those without access to large bandwidth. Rather than having users download from a central location like with FTP, BitTorrent spreads the load out by having peers -– the people who are trying to acquire the file -– uploading as they download. In short, what this boils down to is that the more users there are that want a file, the faster everyone is able to get their hands on it.
This is the direct inverse of traditional point to point transfers, like with FTP. Here, an increase in a file’s popularity will see the download speeds of each person connecting slow down as the limited bandwidth of the site is shared among all connected users.
So what does Bittorrent do differently?
Break it upBitTorrent protocol breaks files up into small blocks, typically 250KB in size. Upon starting a download the user’s BitTorrent client automatically searches for the least widely distributed block. Once it’s downloaded and checked for errors, it’ll begin to upload it to other users who are requesting it while beginning a search for the second least distributed block.While in this mode, a user is called a peer.
Once the entirity of the file has been received, they become what's known as a seed. As owners of the complete file, they can serve out any and all blocks to peers. Ultimately, if everyone who wanted the file connected and stayed connected, all peers would eventually become seeds.
Logically, peers will be able to download faster if they are outnumbered by seeds. This is, naturally, rare when a file first goes live. However there don’t need to be any seeds participating in sharing for peers to successfully complete their download provided there’s a copy of every block somewhere in the 'swarm' of interconnecting peers.
In this sense, the BitTorrent protocol is more resiliant than any other file sharing system to the apathy of users who don’t want to contribute more than they have to.
Similar to KaZaA, the BitTorrent protocol assigns higher priority to peers who upload a considerable amount. This can mean that popular torrents start off rather slowly, hovering somewhere between 10 and 20KB/s until the user has distributed some blocks of their own. While this does help prevent leeching, it means that BitTorrent isn’t really accessible for those with dial-up connections. Though, to be fair, the overheads of searching for blocks and communicating with peers make it unrealistic for dial-up users to begin with.
Issue: 133 | February, 2012