About the BitTorrent protocol. Some details of its operation

About the BitTorrent protocol

In previous article I started a brief introduction to how the BitTorrent protocol works which is my preferred way of sharing files on P2P networks. We had agreed that the procedure consists of generating a torrent file and sharing it through a tracker (Server that is responsible for communicating to the rest of the network the availability and location of a file and where to find it). Another alternative is to use a magnetic link, with which you search node by node until you find the file. This is how the process continues.

It must be clear that the crawler is kind of like the yellow pages. It only contains information on where to find something, but does not participate directly in the exchange.

When some other member of the swarm (The set of computers connected to the network) has an interest in the file begins by downloading fragments of it (I'll go into detail on that later.) Upon reaching a certain level of discharge start sharing those files with other clients interested in the same file. In other words, everyone who downloads that file offers bandwidth so that others can also download it, increasing the speed for all.

Download files over the BitTorrent protocol. Roles.

Now I want to describe in more detail the different components of a BitTorrent network and their function.

The tracker

A BitTorrent tracker It is a server that has installed software in charge of centrally coordinating the transfer of files between users. The aforementioned server does not host copies of the files since its only function is to only make the pairs meet.

To exchange information, the tracker and the client using a simple protocol over HTTP similar to that of the user entering a web page. In this exchange, clients inform the tracker about the file they want to download, its IP and port, and the tracker responds with a list of peers that download the same file and their contact information. Those that make up the list next to the one you want to add to the download make up the aforementioned "swarm". However, this step can be avoided since BitTorrent clients implemented Distributed Hash Table (DHT) technology in which each node takes over the tracker role.

The torrent file

Also called metainfo, it has the extension .torrent and is the one that is downloaded from most websites that collect torrents.

This file contains encoded information including the crawler URL, the file name, and the hashes of the parts of the file to verify which ones were downloaded.. To create this file the BitTorrent client needs the location of the original file and the url of a crawler.


From the moment the file is uploaded for the first time, the team is known as a seeder or seeder and must remain connected to the swarm until all the rest of the swarm have a copy of the file so that others can continue downloading it. The sower nickname is also used for clients who, having downloaded a file, remain fully connected to allow others access. It should be mentioned that the protocol compensates those who share by giving it priority in the download.

Leechers (leeches)

It is not necessary for a member of the swarm or peer to have the entire file to share it. Peers who do not have a complete copy of the file are referred to as leechers or leeches. The leechers ask the tracker for a list of the other members of the swarm who have the missing parts of the file. The leecher will then proceed to download the required part of one of those pairs. At the same time, a leecher will also continue to distribute the parts whose downloads have already been completed. Once a Leecher has downloaded all the parts, it validates them with the hashes present in the meta-information file.

In the next article we will talk about the rules that regulate the operation between the parties.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

A comment, leave yours

Leave a Comment

Your email address will not be published.



  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   vicfabgar said

    I never liked this protocol beyond downloading an iso. To share and force to share (which is what it is about) is much better ed2k / Kad. Because the p2p is in low hours, but KAD has a potential that has not been known or has not wanted to exploit; totally decentralized and without the need for servers (ed2k) and trackers (Bittorrent) to distribute content.