Peer discovery is an essential part of the BitTorrent protocol. It’s how its downloads happen so quickly: You connect to multiple people, and each of them upload a little piece of the file to you. This phenomenon has created a very popular way to download and share information on the internet, both legitimate and illegitimate. Regardless of the effects it has had on intellectual property, I’m here to describe one thing: How the whole BitTorrent DHT peer discovery process really works. You may know a little bit (or a lot) about this mechanism, but surely enough you’re curious to know what the term DHT means and how the peers listed under it found you in the first place.

What Does DHT Mean?

DHT is short for “distributed hash table,” and it represents a medium by which you find peers, also known as “bootstrapping.” I’ll explain that in a bit. Just keep in mind the fact that you can find peers through the DHT.

 BitTorrent DHT location

While many people say it’s decentralized, it’s actually very difficult to do this, given the unicast nature of the Internet. When you connect to the web, you don’t announce your presence to the billions of computers already connected. This would just waste enormous amounts of bandwidth. Instead, your local internet service provider’s router, as well as the destinations you connect to, are the only ones aware you’re even online. That’s what “unicast” means, in layman’s terms. Multicast is what happens when your computer gets into a local network. Its presence is made known to every other computer in the same subnet, and they’re now aware of your presence. Since this doesn’t happen in the external Internet, there’s really no way to actually compose a completely decentralized structure, given the limitations of the BitTorrent protocol itself.

As a result, there tends to be two main DHTs that you connect to when you start downloading a torrent file: router.bittorrent.com and router.utorrent.com. In case you’re curious, you connect to them on port 6881. It’s not absolutely necessary to memorize this information. Sometimes peer data is embedded in the torrent file to make the process of finding peers easier.

Bootstrapping

bitdht-discovery

To start gathering peers, one must first bootstrap into the torrent network. Bootstrapping is just a fancy way of describing the process of connecting to the DHT and finding peers. Once connected, the DHT server will send out a handful of peer IP addresses that you’ll also connect to. They’ll give you the addresses of peers connected to them, and so on, and so forth, until your peer list shows all the peers downloading (or seeding) the file you’re trying to get. It’s like following a tree from the roots to the branches.

Theoretically speaking, you only really need one single peer address to get all the other peers, since it will share the rest of the addresses with you. This saves trackers and the DHT a ton of bandwidth which would otherwise be wasted in sending lists of peers to every new peer connected and notifying each person when one of them disconnects. The hassle is minimized by making peers relay information to each other.

After you’ve found all your peers, your download begins!

If DHTs Are Out There, Why Do Most People Still Use Trackers?

DHT can be fun, but most people still use trackers to download their data. This is because of the inherent nature of the DHT. Let’s say I have a site where I upload a bunch of my open-source creations as torrents. To fully control what happens to those torrents, and protect the privacy of the individuals downloading them, it’s more lucrative for me to host my own tracker. Sites that post illicit downloading material use trackers as their medium of preference to maintain an underground aspect and control what gets published on them and what gets removed.

That said, not all torrent downloads are illegal. There’s a massive repository of open-source projects and public domain works by individuals who just want to share what they have without wasting the bandwidth of their web hosts.

Confused?

If you’re still puzzled by the information shared here, leave a comment below and we can discuss!

Image credit: DHT en.svg

5 Dictionary Tools for Google Chrome

Do you remember back when you had to know how words were spelled? Here is a selection of dictionary tools for Google Chrome.

What Is “UTM_Source” And Should You Be Worried?

You may have seen URLs with a long string attached to the end of the link that looks something like this: “utm_source=facebook&utm_medium=fanpage&utm_campaign=new+article&wa_ibsrc=fanpage.” Should you be worried about the implications of this? We’ll have a look at what UTM is and answer any question you might have on this subject.

Secure Your Yahoo Account With Second Sign-in and App Password

Yahoo has added a feature called Second Sign-in that allows you to secure Yahoo account with two factor authentication. Here’s how you can enable it.

Don’t Like Gmail’s New Always Display External Images Feature? Here’s How to Disable It

By default, Google has decided to make it so that Gmail will always display external images in your email. If you don’t like this, here’s how to disable it.

Understanding the Various Copyright Licenses

Copyright licenses are complicated. If you want to distribute your work, you will want to find out more about copyright licenses and which one you should use.

Light – A Lightweight and Speedy Firefox Alternative

Light is a lightweight browser built with speed in mind and is ideal for old machines. It is a Firefox alternative with several non-essential features removed.

Pushbullet: Push Links and Files From Chrome or Firefox to Your Android Device

Sending content from desktop to Android is not as easy as it seems. An extension called Pushbullet for Google Chrome and Firefox makes this task easier.

5 of the Best Security Addons for Thunderbird

If you are using Thunderbird as your email client, check out this list of security addons for Thunderbird to secure your emails and protect yourself.

Useful Resources to Learn Android and iOS Coding Online

If you have thought of learning how to code this summer break, here is a list of some of the most useful resources for you to learn Android and iOS coding.

3 Things to Do to Make Your Internet Life More Secure

The Internet is full of hackers and thieves, all wanting to get into your accounts. Here are 3 things you should do to make your internet life more secure.

Why YouTube Added Support for 60 Frames Per Second

YouTube has added for videos to stream at 60 frames per second as opposed to its usual 30. Is this something we should be excited about?

Should You Back Up Physically or On The Cloud?

Between backing up your files physically in external hard disk and the cloud, which one is better? Let’s find out in this article.