Saturday February 11, 2012 6:41 AM AEST

X-Ray: How BitTorrent works

By Chris Taylor
15:18 Apr 21, 2006
Tags: X-Ray
 »
X-Ray: How BitTorrent works

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 sharing
Basically, 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 up
BitTorrent 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.

The traditional client/server model shows its flaws with increased demand.
BitTorrent shares the load out, meaning everyone can get their hands on files faster.


 
 »
 
This article appeared in the April, 2006 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

Buy nowDigital Version