9. Nobody assigns your post office
A device fetches the node list from the coordinator and then computes which nodes hold a space by hashing the header's replication key onto a ring; every device gets the same answer and resharding is the same computation.

9. Nobody assigns your post office

A device fetches the node list from the coordinator and then computes which nodes hold a space by hashing the header's replication key onto a ring; every device gets the same answer and resharding is the same computation.

It explains how a device finds its nodes without being told.

Which sync nodes hold your space? A device asks the coordinator for one thing: the current list of nodes.

Then it computes the answer itself. The space header carries a replication key.

Hash that key onto a ring of the nodes. The nodes it lands on are the ones that hold the space.

Every device runs the same function and gets the same nodes. Nothing is negotiated. Nothing is assigned.

Add a node, and the configuration changes. Spaces move between nodes to match. Every device computes the new answer the same way.

Check yourself. What does a device ask the coordinator for, and what does it compute itself?

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Comments