Index/Simulators

Get Premium
Simulators

Consistent hashing

Add and remove servers on a hash ring and watch how few keys move, next to how many hash % N would have moved.

Consistent hashing ring
ACBD90 keys4 servers

Add or remove a server and watch which keys move.

  • Server A39
  • Server B9
  • Server C16
  • Server D26
Keys and servers are placed on the ring by the same hash; each key belongs to the next server clockwise. A new server only takes over the keys just before it, so only a slice of them move.
Read the explanation in Data Storage, section 2.7