BitTorrent: How Does It Work? (explained)
BitTorrent is a peer-peer file transferring software use to share large files and reduce network traffic by spreading it among smaller networks.
Have you ever downloaded or shared files using torrent? If you have, you must know how useful and easy it is to use. From sharing important data to downloading pirated movies or sitcoms, BitTorrent is used for all. So what exactly is BitTorrent and how does it work?
What is BitTorrent?
BitTorrent is a file sharing protocol that works in a peer-peer network model, meaning it does not have a centralized server for file sharing. This makes file sharing much faster. BitTorrent is mostly used for transferring large files such as videos and movies.
BitTorrent helps not only to share large files but to reduce overall network traffic by spreading it among smaller networks. But even though BitTorrent is such a convenient file transferring protocol, its unethical use for pirating copyrighted material without permission has made it illegal to use for such activities.
How does it work?
In other normal client-server networks, there exists a centralized server; who has the data, and a client; who requests the data. This is a simple network model that is even adapted by the Internet. Here, all the data is stored on the server and not the client. This means that if there are several clients, the rate of data transfer is low because of the congested traffic. This is where BitTorrent comes into picture.
Before we get into how BitTorrent works, lets get familiar with some terms:
Swarm: A group of peers connected together
Seed: A peer that already has a file and makes it available for other peers.
Leecher: A peer that downloads a file from a seed.
Tracker: This is a server that traces the peers and the swarm, locating peers using their IP address. It also keeps record of files that are being downloaded or uploaded.
In BitTorrent, it can be said that each peer in the swarm acts as a server and can share the files that they already have. It is basically taking the load off from a server by splitting it between devices in a smaller network i.e. a swarm.
How BitTorrent works.
Let's say peer1 needs a file named File0. To download the file he first needs to obtain a torrent file (a file with metadata) of File0. The torrent can be found online after some research.
After he obtains the torrent file he connects to the required Tracker. This makes him associated with a swarm, where a peer holds File0.
After this PC1 becomes a leecher. This is the part where he downloads the file that he requires.
When the download is complete, the leecher now becomes a seed, meaning he can now upload the file he has for others. The more the seeds in the swarm, the greater the download speed.