Three cache servers share keys. Rule: key mod 3. Key 42 goes to Server A.
Traffic grows, so Server D is added. The rule becomes key mod 4.
Key 42 now maps to Server C, because 42 mod 4 is 2.
About three keys in four change servers, so most lookups miss.
With 100 servers, adding one still moves about 99 keys in 100.
Plain key mod N reshuffles almost every key when N changes.
On a ring, a new server takes keys only from its neighbour.
So adding or losing a server disturbs very little.
Reach for it when
When keys are spread over servers that come and go, like a 20-node cache. A fixed server count can use plain mod.
The catch
With few spots on the ring, one server can own a huge slice and melt, so each takes many spots.
Say it in an interview“I would use consistent hashing so adding or removing a node remaps only about 1/N of the keys, with virtual nodes to even out the load.”