Intermediate Topic 28 of 51 Distributed Systems & Cloud
Distributed Hash Tables
Decentralized key lookup across peers.
How it works
A distributed hash table provides a lookup service in which key-value pairs are spread over many nodes, with each node responsible for a portion of the key space and each key found in a small number of hops. Protocols such as Chord arrange nodes on a ring with finger tables for O(log n) lookups, Kademlia uses XOR distance and k-buckets, and Pastry and CAN use other geometries. Nodes join, leave and fail without central coordination, and replication stores keys on several nodes.
Where it is used
BitTorrent trackerless peer discovery, IPFS, Ethereum node discovery and some decentralized storage and naming systems use DHTs. Dynamo-style stores borrow related ideas.
Common pitfall
Churn requires continuous stabilization and replication. Malicious nodes can attack routing through Sybil and eclipse attacks, needing identity costs or verification. Lookup latency depends on the number of hops over the wide-area network. Load balancing needs virtual nodes. DHTs support exact-match lookups, not range queries.
Where it fits in the course
Distributed Hash Tables is topic 28 of 51 in Distributed Systems & Cloud, rated Intermediate. It follows Consistent Hashing. The next topic is Gossip Protocols.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Distributed Systems & Cloud quiz.
- Explore the Hash Table visualizer: Hash function, buckets and chaining collisions.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Distributed Systems & Cloud quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Distributed Hash Tables?
Where do people use Distributed Hash Tables?
What is the most common mistake with Distributed Hash Tables?
What should I learn before this topic?
How can I practice it?
Is Distributed Hash Tables hard to learn?
How long does it take to learn Distributed Hash Tables?
Which topics are related to Distributed Hash Tables?
What should I study after Distributed Hash Tables?
Related topics
- Consistent Hashing (Distributed Systems & Cloud)
- Gossip Protocols (Distributed Systems & Cloud)
- Saga Pattern (Distributed Systems & Cloud)
- Failure Detectors (Distributed Systems & Cloud)
- Hash Tables (Data Structures)
- Tables, Rows and Columns (Databases)
- Truth Tables (Computer Architecture & Logic)