Year-End Discount: 10% OFF 1-year and 20% OFF 2-year subscriptions!

Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

hash table
distributed
dht
data structures

What is a distributed hash table?

Educative Answers Team

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

A distributed hash table (DHT) is a decentralized storage system that provides lookup and storage schemes similar to a hash table, storing key-value pairs.

Each node in a DHT is responsible for keys along with the mapped values. Any node can efficiently retrieve the value associated with a given key.

Just like in hash tables, values mapped against keys in a DHT can be any arbitrary form of data.

svg viewer

DHTs have the following properties:

  • Decentralised & Autonomous: Nodes collectively form the system without any central authority.
  • Fault Tolerant: System is reliable with lots of nodes joining, leaving, and failing at all times.
  • Scalable: System should function efficiently with even thousands or millions of nodes.

Just like hash tables, DHTs support the following 2 functions:

  1. put (key, value)
  2. get (key)

The nodes in a DHT are connected together through an overlay network in which neighboring nodes are connected. This network allows the nodes to find any given key in the key-space.

svg viewer

RELATED TAGS

hash table
distributed
dht
data structures
Copyright ©2022 Educative, Inc. All rights reserved

Tired of LeetCode? 😩

Learn the 24 patterns to solve any coding interview question without getting lost in a maze of LeetCode-style practice problems. Practice your skills in a hands-on, setup-free coding environment. 💪

Keep Exploring
Related Courses