BitTorrent is a technology or protocol, to help Peer-to-Peer file sharing in a network of computers. The technology is popular these days to transfer digital content across internet through torrent clients like uTorrent, vuze, BitLord, ZBigZ, BitComet etc.
What is a BitTorrent Client?
While BitTorrent is a File sharing/transferring protcol like FTP, SSH protocols etc, Torrent Clients are the software application that helps you to get the job done – MP3, MP4, docs transfer/sharing.
In this post I will try to give you some basic idea as to how this protocol works. This will in turn help you understand the basic terminology and principle behind the working of BitTorrent clients.
To understand BitTorrent, you need to have an understanding of the Computer Network.
What is a computer Network?
A computer network is a set of computer that are connected to each other and serves the purpose of sharing resources. A typical example is the Internet which is a huge network connecting billions of devices. A file server is another example.
There are different ways these computers in a computer network coordinate to share resources, these leads us to the concept of computer architecture – two well-known examples can be Client-Server Architecture and P2P (Peer-to-Peer).
A Client Server architecture is an architecture where there is a powerful server and ‘n’ number of Clients. Server computer serves and the client consumes. The role of server and clients in well defined. It’s a centralized mode of communication between server and clients.
In a P2P network, you do have servers and clients but these are called peers. Because the same device can act as both client and server. It is a decentralized mode of communication, here either party can initiate a session and have similar capabilities of serving and consuming. The communication strategy is based on new peers joining the network and participating in communication. Each peer can serve and receive from other peers in the network. This means there is less predictable speed of transfers, always increasing when more peers are in the network and decreasing when less peers available. But most importantly this also eliminates the Single point of failure that is associated with the server in a Client-Server architecture. It’s a lean architecture and provides for low bandwidth communication.
So it goes without saying that BitTorrent is based on P2P architecture and hence provides many significant benefits.
How BitTorrent works?
Let say a large file –a video file needs to be shared. Instead of downloading the file from a server computer, the BitTorrent client helps you join a group of other computers having BitTorrent client with Peering capacity – called peers. What this means is that, you both – upload and download chunks/pieces of the large file from other peers at the same time. Another thing to note that – not all chunks/pieces of data would be downloaded from a single peer, instead different peers upload different data chunks and this all get assembled into the complete file –say reconstructed.
How does it all start at the first place?
A person who wants to share some large file, creates a torrent file, which is basically an assembly of metadata about files and folders that needs to be distributed and network location of trackers. A tracker in the context of BitTorrent is a special server that handles the communication between peers. A torrent file also contains hash values for verifying integrity in file transfers. This file is shared through any medium say website, email, blogs or other means. Once you open the file in a torrent client, you are added into the BitTorrent network acting as a peer and participate in file sharing!
Based on their function/attributes different nodes in a BitTorrent network are called peer, leecher, seeder. To know more about this please refer to the below post.