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

Follow YouTube Channels Easily With YouTube Video Deck

There are approximately two bajillion videos on YouTube and staying up-to-date on a couple of channels could be difficult. YouTube Video Deck makes it easier and faster to follow YouTube channels.

Block Javascript For A Single Site in Google Chrome

Rather than blocking javascript browser-wide, wouldn’t it be great if you can block javascript only for a specific site? Here is how you can do so.

How to Copy All Links on a Web Page in Firefox

Have you ever wanted to copy all links on a web page while browsing? This Firefox add-on lets you copy all links on a web page in a matter of seconds.

5 Great Sites That Help You Build Creative CVs

Your resume is an important part of your professional life and it doesn’t have to be boring. Here are 5 of the best sites to build a nice and creative CV.

Is the Era of Privacy Over?

The governments have been using various measures to get hold of our information. So, have we left the era of privacy behind us?

How to Add Notes to Specific URLs in Chrome

Bookmark a URL doesn’t allow you to add your own notes about that site. If you want to add notes and save webpages at the same time, AnnoPad is a great solution.

Three Free Fonts to Spice Up Courier

Courier New is the most popular variant of the monospace typeface. Here are 3 free versions of Courier to spice up your working environment right now.

How to Split Screens in Chrome with the New Tab Resize

Tab Resize is a Chrome extension that allows you to easily split the screen layout to display multiple tabs in one tiled view. Let’s check out how it works.

5 Cool IFTTT Recipes to Automate Your Social Life

IFTTT has a bunch of other cool and super useful social media recipes. Check out these 5 cool IFTTT recipes to automate your social life.

Easily Add Gesture Support to Your WordPress Site

Other than responsive design, it is also important to add gesture support to your website for mobile devices. Here is how you can do so in WordPress.

Protect Your Privacy and Browse Securely with HideMyAss VPN

HideMyAss VPN lets you access videos from any country, evade hackers and surf privately. Come read about all its features and enter to win 6 months free!

4 Big Questions About Elon Musk’s Satellite Internet Plan Answered

A network in space to provide internet access throughout the world sounds good, but is it feasible? Here are the answers to some of the major questions asked.