Distributed hash table
A class of decentralized distributed systems
A distributed hash table (DHT) is a class of a decentralized distributed system that provides a lookup service similar to a hash table: (key, value) pairs are stored in the DHT, and any participating node can efficiently retrieve the value associated with a given key. Responsibility for maintaining the mapping from keys to values is distributed among the nodes, in such a way that a change in the set of participants causes a minimal amount of disruption.
Overview[edit | edit source]
DHTs form an infrastructure that can be used to build more complex services, such as distributed file systems, peer-to-peer file sharing systems, content delivery networks, domain name systems, and blockchains. They are designed to scale to large numbers of nodes and to handle continual node arrivals, departures, and failures.
Key Concepts[edit | edit source]
- Key-Value Pair: The fundamental unit of data in a DHT, consisting of a unique key and its associated value.
- Node: A participant in the DHT network that stores a portion of the key-value pairs.
- Routing: The process of finding the node responsible for a given key.
- Overlay Network: The virtual network formed by the nodes in a DHT, which is used to route messages.
Operation[edit | edit source]
DHTs use a consistent hashing algorithm to assign keys to nodes. Each node is responsible for a range of keys, and the DHT ensures that each key is stored on the appropriate node. When a node joins or leaves the network, the DHT redistributes the keys to maintain balance.
Insertion[edit | edit source]
To insert a key-value pair, a node computes the hash of the key to determine the responsible node and then stores the pair on that node.
Lookup[edit | edit source]
To retrieve a value, a node computes the hash of the key and routes a query to the responsible node, which returns the value.
Applications[edit | edit source]
DHTs are used in various applications, including:
- BitTorrent: A peer-to-peer file sharing protocol that uses DHTs for decentralized tracking.
- Kademlia: A DHT used in several peer-to-peer networks.
- Chord: A protocol and algorithm for a DHT.
- Pastry: A scalable, distributed object location and routing substrate for wide-area applications.
Advantages[edit | edit source]
- Scalability: DHTs can handle a large number of nodes and data.
- Fault Tolerance: DHTs can continue to function even when nodes fail or leave the network.
- Decentralization: There is no single point of failure or control.
Challenges[edit | edit source]
- Security: Ensuring data integrity and preventing malicious nodes from disrupting the network.
- Load Balancing: Evenly distributing keys among nodes to prevent any single node from becoming a bottleneck.
- Latency: Minimizing the time it takes to route messages and retrieve data.
See Also[edit | edit source]
- Distributed computing
- Peer-to-peer
- Hash table
- Blockchain
- Content delivery network
- Domain name system
References[edit | edit source]
Search WikiMD
Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD
WikiMD's Wellness Encyclopedia |
Let Food Be Thy Medicine Medicine Thy Food - Hippocrates |
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.
Contributors: Prab R. Tumpati, MD