Search code examples
p2pkademlia

How the number k is chosen in Kademlia?


I read the paper about Kademlia available here.

I don't understand how the number k is chosen (for the k-bucket).

I don't understand this sentence: "k is chosen such that any given k nodes are very unlikely to fail within an hour of each other."

I don't understand how a node failing?


Solution

  • Kademlia is an abstract algorithm.

    Individual implementations can choose their own k based on expected characteristics of the nodes in the network.

    For example if you wanted to form a small overlay of a few hundred nodes in a highly reliable datacenter then k = 2 may be sufficient.

    Bittorrent uses k = 8 with lots of domestic (read: quite unreliable) nodes scattered over the whole internet and it does its job, but its job is not particularly demanding. So one can't infer that that's the upper practical limit from that alone.

    I don't understand how a node failing?

    Computers crash, go offline, change internet connections, reboot, are put into hibernation. All those are things that effectively are node failures from the perspective of the network.