Hi,Have you heard of torrent? Oh! you must have. Many of you have used torrent to download files and other documents from internet. But many of us are unaware of how torrent works and what torrent is?
Lets talk about Torrent in detail.
What is torrent?
Torrent is actually a computer file type used by BitTorrent protocol. This file contains meta data about the file’s and folder’s size, their list of locations (called trackers in language of torrent). This has extension of .torrent. One more and most important thing about torrent file is that, it does not contain files or folders that you want to download. It only contains the Structure, Location and other information about file. In current days, this has been replaced by Magnet Link which is a web version (hyper link) of this file containing all information about this file.
History of BitTorrent?
How it works?
Now, if the torrent file does not contain files to be downloaded, how actually it works? Lets see a image below to understand more clearly.
Requirement and Background
While the file is of Gigantic size and need to be distributed among many users, what is the cost of server. The same amount of data has been transferred to each users. Suppose a file of one GB is to be shared among a thousand users. Then server needs more than a one Terra Byte of bandwidth which will surely cost a lot for any company. This will also impact the performance of server. To overcome this, BitTorrent protocol is designed where you need not to distribute file to each user, Once user downloaded a file, that can even uploaded from users PC.
Most of Computer Science students are known and for others information, data is transmitted in Packets over internet. A complete file can not be transferred at at time if that has lot of data. And you have heard of Bit and Byte. At a single time a limited byte of data can only travel or transmits between two IP (computers).
Suppose, we have a file of 100 MB and our computer hardware determines and think that it can be transmitted if the file has been broken into 100 pieces and then tells receiver that it has send 100 pieces of a file, combine and give to user, in general language. This is also applicable for torrent also. Torrent file has meta data where the piece size has been mentioned. The complete file has been broken into pieces and assigned a serial number (virtual). Then at the time of distribution, these pieces are downloaded to users computer one by one. And most importantly, based on permission from user, the downloaded pieces are again uploaded to other user who is downloading same file.
Advantage
- Server cost is reduces because file is later shared using peers (other users who are downloading)
- Even your Internet get disconnected or you shut down your computer, your files are saved in hard disk and if you think of continuing the download, only remaining pieces will downloaded. This is intelligence added in BitTorrent clients.
- Better download speed.
- Faster distribution