Detox-Comic

How BitTorrent works

First, you use a BitTorrent search engine to find what you want. This is usually a web site that contains a database of active torrents. When people create a new torrent they upload it to one of these torrent sites so others can find it. When you find the exact torrent you are looking for you click on the link.

The Torrent is actually a file which your BitTorrent client understands. It basically contains information about the file(s) within the torrent and how many pieces it is split into and how big each piece is plus how to verify the integrity of the data. It also contains details about the host computer known as the tracker, which coordinates the distribution of the torrent.

Your client communicates with the tracker (a server) now and again during the download in order to get updated details about the swarm. The swarm is all the computers currently sharing part or all of this particular torrent. It then displays this information in your client in the form of Seeds, Peers and Availability. The tracker does not contain the actual files you are downloading, only information about how to get them.

Every computer known to the tracker to have a complete copy of the file you want is known as a seed. Any computer that has a part of the file you want is a peer. If there is one seed and no peers then the availability is 1.0. If there is one seed and one peer with half of the file then the availability is 1.5. If there is one seed and two peers with half of the file but they are the same half, then the availability is still 1.5. It is possible for there to be an availability of 1.0 or greater and for there to be zero seeds. This is only if every piece of the file is available among all of the currently active peers.

This is a pretty clever peer-to-peer protocol. Previous protocols allowed you to find the file you wanted and connect to a single computer hosting that file. You were then limited to the speed between you and that computer although you could choose another host if there was one available or the one you were currently communicating with had disconnected.

With the file being split into smaller pieces and multiple computers hosting these pieces (or all of the file), simultaneous downloads from different sources can occur at the same time. The client then joins these pieces together. Once 100% of the torrent is downloaded to your computer, the client seeds the file for others to download. You can choose not to seed the file and remove it from your client's torrent list.

When I first set up the BitTorrent client and clicked on my very first torrent file I was getting a slow download speed. As time passed it got slower and slower until it was a trickle at best. I just could not get it to download any faster. The reason being I was behind a hardware firewall and I was not sharing what I was downloading.

The word peer means someone of the same status as you, in other words a fellow file sharer. You help each other out by passing pieces of the file between each other until each person gets all the pieces of the file. If you are always receiving but never giving then you are not a peer but what is referred to as a leech.

If my computer refused to upload to the peers that I was downloading from then I was labelled a leech and they would prevent my computer from accessing their pieces of the file. After a while all peers would eventually stop talking to me. The only way I was receiving anything was when new peers joined the swarm and that would stop when I did not send them anything.

I needed to stop being a leech and to share (trade) with the peers in the swarm otherwise I would never get the files I was after.

In order to do this I had to open a hole in my hardware firewall so that they could talk to me. To do this you open a port which is specified by your BitTorrent client or by you configuring your client. Opening this port is known as port forwarding. Once I did this my download speed greatly increased as did my upload speed. You can configure your client to limit your upload speed. If you do this I recommend finding torrents with a great number of seeds and peers otherwise your download speed will be limited as well.

Opening a port in your firewall can be a security risk but using a good software firewall in conjunction with your hardware firewall adds an extra level of security.

If you have any feedback regarding this article, or you have a suggestion for a new article, or just want to say thanks for the info then feel free to drop me an email at dave@detoxcomic.com.

Article updated: 27-Nov-2006

Click here for more articles