A mental model: place servers & keys on a ring; assign clockwise. Add/remove servers and see minimal key movement. Toggle replicas and failures.
Ring = keyspaceSolid line = primary assignmentDashed = replicasRed label = server down
Setup & Controls
3
0
Servers
0
Keys
0
Keys moved (last change)
What is consistent hashing?
• Place servers and keys on a circular keyspace (0–359° in this demo).
• A key is assigned to the first server clockwise from its position (primary).
• Replication: also place copies on the next R−1 servers clockwise.
• When a server is added, only keys in its clockwise interval move to it.
• When a server fails, keys failover to their next replica holders.
Tip: add a server, then watch how few keys move. Toggle a server down to simulate a crash and see replicas pick up the load.