How BitTorrent Works?

Different Client Torrents

Most of us heard about torrents and probably also have tried them to download movies, or books, or music, TV series, games, etc. But, What is BitTorrent? and How Does it Work?

BitTorrent is a hyper distribution communications protocol for peer-to-peer file sharing (“P2P”) which is used to distribute data and electronic files over the Internet.It was developed by Bram Cohen a computer science graduate student at the University of Buffalo.

Bittorrent takes the stress of transferring large data files from one massive server to every user over an extremely robust network connection and splits it up to multiple normal PCs and multiple smaller network connections.

If you are a Torrent user, you may notice the terms “Seeds”, “Peers” and “Leeches”, let’s understand these terms.

What is a seed?
Seed is the user that have the complete file downloaded already and are now sharing the file with peers but not downloading any parts of the file from others.

What is a leecher?
Leechers are those who are downloading and uploading at the same time.

What is a peer?
Files are downloaded in pieces. When a user downloads some parts, he then automatically starts uploading it. A file will be downloaded quicker if more users are involved in the process.

The first time a file is shared, there is a single seed or user who is uploading the file to the first downloader, a peer first creates a small file called a “torrent”. This file contains metadata about the files to be shared and about the tracker, so a torrent will always be relatively slow when it’s just been created, however once that original upload/download process complete the user or users who downloaded the file also known as peers from the original seeds also turn into seeds and then the more popular file is the more seeds are created and the faster the speed will be for newcomers.

References
https://en.wikipedia.org/wiki/BitTorrent
http://www.geeksforgeeks.org/p2ppeer-to-peer-file-sharing/

This article is contributed by Akash Sharan. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

GATE CS Corner    Company Wise Coding Practice

Recommended Posts:







Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.