View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12893 Members
Join this group to post and comment.

How exactly do torrents work?

We have all used torrents. Be honest, you have, and 99.9% of the time it is used to nab music, TV shows and movies without having to pay for them. Now let’s get some things out of the way, BItTorrent technology is 100% legal but the files that you transfer are not. In a country like India where broadband speeds are still relatively slower we cannot take advantage of affordable streaming platforms like Amazon Prime Video. When the speeds are as low as 1Mbps after FUP you are stuck with a pixelated stream or worse in my case no stream at all. Plus there is the content library issue. I recently stumbled upon a really fantastic show called “Adam Ruins Everything” (a must recommended show for all) and sadly it is not available for streaming on any service in India and my requests to English TV channels has gone unheard. So I had to resort to the only alternative, buying shows off Amazon US. Just kidding I found torrent links and enjoyed an entire season of information and fun.

While torrenting, we never think of what goes on in the background. We all know it is a peer-to-peer system. A peer-to-peer system is where the file in question is distributed among multiple users (some times in thousands). Now the peers may have the complete file or a partial file. You go to your favourite torrent tracker website find the torrent file and you download. Now this torrent file has the tracker link which keeps a track of who has the full and partial files so that they can be transferred to others. Your bittorrent client is responsible for downloading the file but my questions about this system which I want to open for discussion to the members of the forum are:

(1) How does the bittorrent client know which part of the file it is receiving and which part it needs to accept and which to reject and how does it combine it to one file?

You see in a direct download the entire file exists on one server which means it is downloaded from one source and assembled on your computer. Your computer can do a check with the original file in the server and the one you have to make sure your download is complete but how does that happen in torrents? How does the client prevent downloading of a part of the file you already have? How does it make sure it is receiving the needed parts of the file.

(2) How do torrents work when there is not centralised tracker aka Magnet Links?

Once The Pirate Bay got into the legal mess it started using Magnet Links where no centralised tracker was present, they called this system Magnet Link. This way they can say to the court that they are not hosting even the torrent file. Now how can Magnet Links work when there is no way of knowing who has the file and what part do they have.
Ankita Katdare
Ankita Katdare • Nov 5, 2017
That's quite a topic that you have come up with for discussion. Thanks for the informative insights @Satya Swaroop Dash Never knew about Magnet Links. I did a quick check online and found a sane explanation -

A magnet link is essentially a hyperlink containing the hash code for that torrent, which your torrent client can immediately use to start finding people sharing those files.

I also wanted to know a bit more about how exactly seeders and leechers work in a torrenting system. Once during my visit to the local ISP in my area, I found a couple of guys discussing about how the uploads are using up a much more of their data than downloads. I always thought that one could control how much of it is one uploading. Is that not how it works? I'm sorry but I'm a noobie here. 😯

Share this content on your social channels -