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

Converting Files In Google Drive With DriveConverter

If you’re looking for a built-in tool to convert files in Google Drive, then try DriveConverter, a web app and Chrome extension specially built for Google Drive. It offers more flexible conversion features for documents, images and music files.

Track Time and Goals Using Progress Bar Timer [Google Chrome]

Tracking your time and task can be a difficult job. While some may have no trouble keeping track of time in their heads, others may benefit from a more visual means of measuring progress. Progress Bar Timer is a Google Chrome extension that turns deadlines and quotas into convenient progress bars to help track time and goals.

How to Create QR Codes From The Context Menu In Your Browser

QR codes are becoming increasingly popular these days. In this article, we will show you how you can quickly create QR codes directly from your browser’s context menu.

Why You Should Have Local Backups Of Your Cloud Backup

When it comes to cloud storage, one of the things you shouldn’t do is to place all your eggs in one basket. You should also take the precaution to backup the data to somewhere you can physically access. Allow me to explain why.

How to Easily Enable Real-time Collaboration on Your Site

If you are a webmaster, you might be thinking of how you can make your website more interactive, or even allowing your visitors to collaborate with one another. TogetherJS allows you to easily add a real-time collaboration feature to your site with minimal technical/coding skill.

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.

Using the New Microsoft Office App in Chrome

Following up to its revamp of the office web apps, Microsoft released a Chrome extension that allows you to use Office in Chrome browser. Let’s check it out.

Use Rublon to Add Automatic Two-Factor Authentication to WordPress

Rublon is a plugin that implements two factor authentication in WordPress, without you having to do the additional authentication step. Let see how it works.

Syncthing: An Open Source Alternative for Dropbox and BitTorrent Sync

If you want to keep your files safe while synchronizing them between computers, Syncthing is a good alternative for Dropbox that you can use.

5 Mistakes That Every WordPress User Should Avoid Making

As we focus all our attention to post great content, we tend to make some mistakes on WordPress that can be fatal. Here are top 5 mistakes that every WordPress user should avoid making.

What is Password Hashing (and How Does It Work)?

If there was a breach and your encrypted password was leaked. Is your account at risk? Read on to find out how password hashing work and how it affects you.

How to Clone and Migrate WordPress Sites the Easy Way

Migrating your WordPress site? Duplicator allows you to easily clone and migrate WordPress sites without messing with a whole lot of complicated settings.