Kademlia: A Peer-to-Peer Information System Based on the XOR Metric

Kademlia: A Peer-to-Peer Information System Based on the XOR Metric

2002 | Petar Maymounkov and David Mazières
Kademlia is a peer-to-peer distributed hash table (DHT) with provable consistency and performance in a fault-prone environment. It uses a novel XOR-based metric topology to route queries and locate nodes, simplifying the algorithm and facilitating proofs. The topology ensures that every message conveys or reinforces useful contact information, allowing parallel, asynchronous queries that tolerate node failures without timeout delays. Kademlia minimizes configuration messages, spreads information automatically, and allows nodes to route queries through low-latency paths. It resists denial of service attacks and has properties that can be formally proven with weak assumptions about uptime. Kademlia uses an XOR metric for distance between points in the key space, which is symmetric, allowing nodes to receive queries from the same distribution of nodes in their routing tables. This contrasts with systems like Chord, which have asymmetric routing tables. Kademlia uses a single routing algorithm to locate nodes near a particular ID, unlike other systems that use different algorithms for different stages. Kademlia treats nodes as leaves in a binary tree, with each node's position determined by the shortest unique prefix of its ID. The Kademlia protocol ensures that every node knows at least one node in each of its subtrees, allowing any node to locate any other node by its ID. The system uses a precise notion of ID closeness to store and lookup key-value pairs on the k closest nodes to the key. The lookup algorithm is detailed, allowing nodes to find contacts in lower subtrees until the target node is located.Kademlia is a peer-to-peer distributed hash table (DHT) with provable consistency and performance in a fault-prone environment. It uses a novel XOR-based metric topology to route queries and locate nodes, simplifying the algorithm and facilitating proofs. The topology ensures that every message conveys or reinforces useful contact information, allowing parallel, asynchronous queries that tolerate node failures without timeout delays. Kademlia minimizes configuration messages, spreads information automatically, and allows nodes to route queries through low-latency paths. It resists denial of service attacks and has properties that can be formally proven with weak assumptions about uptime. Kademlia uses an XOR metric for distance between points in the key space, which is symmetric, allowing nodes to receive queries from the same distribution of nodes in their routing tables. This contrasts with systems like Chord, which have asymmetric routing tables. Kademlia uses a single routing algorithm to locate nodes near a particular ID, unlike other systems that use different algorithms for different stages. Kademlia treats nodes as leaves in a binary tree, with each node's position determined by the shortest unique prefix of its ID. The Kademlia protocol ensures that every node knows at least one node in each of its subtrees, allowing any node to locate any other node by its ID. The system uses a precise notion of ID closeness to store and lookup key-value pairs on the k closest nodes to the key. The lookup algorithm is detailed, allowing nodes to find contacts in lower subtrees until the target node is located.
Reach us at info@study.space