This paper introduces Kademlia, a peer-to-peer distributed hash table (DHT) designed for fault-prone environments. Kademlia features provable consistency and performance, using a novel XOR-based metric topology that simplifies the routing algorithm and facilitates its proof. The topology ensures that every message exchanged conveys or reinforces useful contact information, enabling parallel, asynchronous query messages that tolerate node failures without imposing timeout delays on users. Key features of Kademlia include minimizing configuration messages, automatic spread of configuration information, efficient query routing, resistance to certain denial-of-service attacks, and formal proofs based on weak assumptions about uptime distributions. The system treats nodes as leaves in a binary tree, with each node's position determined by the shortest unique prefix of its 160-bit ID. This approach allows for efficient and flexible routing, making Kademlia superior to other DHTs like Chord and Pastry in terms of query efficiency and robustness.This paper introduces Kademlia, a peer-to-peer distributed hash table (DHT) designed for fault-prone environments. Kademlia features provable consistency and performance, using a novel XOR-based metric topology that simplifies the routing algorithm and facilitates its proof. The topology ensures that every message exchanged conveys or reinforces useful contact information, enabling parallel, asynchronous query messages that tolerate node failures without imposing timeout delays on users. Key features of Kademlia include minimizing configuration messages, automatic spread of configuration information, efficient query routing, resistance to certain denial-of-service attacks, and formal proofs based on weak assumptions about uptime distributions. The system treats nodes as leaves in a binary tree, with each node's position determined by the shortest unique prefix of its 160-bit ID. This approach allows for efficient and flexible routing, making Kademlia superior to other DHTs like Chord and Pastry in terms of query efficiency and robustness.