About the BitTorrent protocol. Its behavior and some clients for Linux

About the BitTorrent protocol

To end this series of articles on the BitTorrent protocol We will look at the rules that govern their behavior. Below I will list some clients available for Linux.

About the BitTorrent protocol and how it works

Selecting parts of the file

We had seen in the previous article that when the sower uploads a file for the first time, it is divided into parts that will be distributed among the different leechers in order to ensure that the complete file is always available. If a part is missing, the download will fail for the entire swarm. PFor this, a selection algorithm is implemented that will determine which one will be downloaded at each moment.

There are different options:

  • Random selection: Any of the available parts is assigned to you so that you can start sharing it
  • The least shared part: The least shared part so far is assigned first. This is usually done when the original file is no longer available.
  • Strict policy: My literal translation from English. When the parts are in turn divided into smaller parts, the subpart that is downloaded first will then cause the related subparts to be downloaded to rebuild and make it available to the rest of the swarm.
  • Endgame mode: Applies when the file is almost completely downloaded. To prevent the download time from being unnecessarily extended due to the end portion being available only from a low bandwidth source, it is exceptionally allowed to request all members of the swarm.

Reciprocity mechanism

A reciprocal mechanism is used to achieve consistent loading speeds. This means that a peer will react to what the peers they are connected to do. For the duration of the connection, each peer will share its parts of the file with four other peers. The selection is made based on the download speed that they share with said pair. These download rates are calculated based on a continuous average of 20 seconds and the customer recalculates them every 10 seconds.

However, the following exceptions occur:

  • Every 30 seconds it connects to an additional pair regardless of its download speed to find unused connections that may be better than the current ones. This is usually the case of newly connected leechers who haven't started sharing yet.
  • When a peer does not receive anything from the peers it connects with, it will try to establish more than one of the connections described in the previous point.
  • In the event that the leecher has downloaded its entire file, becoming a seeder, it will privilege those peers with whom no one is sharing the file.

BitTorrent Clients for Linux

Unlike what happens with the ED2K and Kademlia networks, there are multiple clients for the BitTorrent network that can be used in Linux. In general, the most popular Linux distributions come with one pre-installed.  Transmission andn the case of those based on GNOME desktops and Ktorrent on KDE-based ones. Brave browser brings the client WebTorrent built-in and, this can also be used as a desktop application.

Other options


Es a client open source multiplatform inspired by the well-known µTorrent. For my taste has the best search engine, although you have to configure it manually with a somewhat cumbersome process. We can work with magnet links and use the DHT and PEX protocols, in addition to arranging with private torrents and through encrypted connections.


Another client cross-platform with support for DHT, Local Peer Discovery (LSD), Peer Exchange (PEX), UPnP and NAT-PMP. It supports the use of a proxy and can be used via the web through a remote connection.


In this case we have something more than a simple BitTorrent client. With Frostwire We can not only search for the file that interests us in the BitTorrent network but also in various sources of online resources. In addition, it has a built-in player and a media manager to locate downloaded files easily.


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

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *



  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.