What is the peer to peer architectural design?

Example – BitTorrent

BitTorrent is a very famous P2P protocol that allows users to share data in a distributed manner. It is mostly used for the transfer of video and audio files, such as movies and songs. To use it, users have to download a BitTorrent client such as μTorrent on their system.

BitTorrent tracker

BitTorrent tracker is a server that helps peers communicate effectively and efficiently. It keeps a list of the peers and which files they have. When a client makes a request for a file, the tracker knows which peers are available and coordinates the transmission from server peer to client peer, as well as reassembly of the requested file. Reassembly is required because pieces of the file may be downloaded from different peers.

Seeders and leechers

Seeders: The peers which act as a server. They have the complete file downloaded and are sharing it with other users.

Leechers: The peers that act as a client. They have requested a file and are downloading it.

The download speed is directly proportional to the number of seeders of any file. If multiple peers have access to the complete file, each can share a piece of the file. Users can download these separate pieces simultaneously because download speed is always greater than upload speed.

However, if there are no seeders and only leechers, there won’t be anything to download because no peer will be sharing the file.