English
English
Appearance
English
English
Appearance
How IPFS nodes find each other and discover who has the content you're looking for.
A Distributed Hash Table is a decentralized lookup system. Think of it as a phone book that no single person holds — instead, each participant holds a few pages, and they know who to ask for the pages they don't have.
In IPFS, the DHT maps CIDs to the network addresses of nodes that have the corresponding content. When you request a file by CID, the DHT helps you find which nodes can serve it.
IPFS uses a variant of the Kademlia DHT. Each node maintains a routing table of nearby nodes (in terms of XOR distance between node IDs). When a node wants to find content:
TIP
This lookup typically takes only a few hops — even in a network of millions of nodes, a file can be located in 20-30 steps.
When a node pins content, it publishes a provider record to the DHT announcing: "I have CID X, and my address is Y." These records expire after ~24 hours and must be refreshed periodically. This is why active pinning matters — without it, provider records expire and the content becomes undiscoverable.
IPFS.NINJA handles all DHT interactions for you. When you upload a file: