Description
This is a question for understanding data movement during adding or removing a node to cluster.
In my understanding, jump consistent hashing
does not hash node
on the ring. It seems like their is no ring concept. The output of hash is a number in [0, nodes)
range which maps to a node.
If a new node is added to cluster, how will we know which all keys need to move to this node ?
Will we have to go to all
nodes, read all
keys and see if they belong to this new node ?
Can you point me to code which does this ?
In ring based consistent hashing
, new node will be in ring and will copy keys from next node to itself. So, it may require going over all keys on only one
node. However, in real world, one node maps to many buckets on the ring, so we may have to go to multiple nodes in ring based consistent hashing
as well.