>_

Consistent Hashing

Visualize the hash ring, virtual nodes, and key distribution under topology change.

Nodes

4

Virtual nodes

48

Imbalance

64%

load spread (0% = perfectly even)

Keys moved

0

Per-node load

Node 062
Node 114
Node 227
Node 317

How this simulator works

A hash ring maps keys to nodes clockwise. Virtual nodes smooth the distribution; adding or removing a node only remaps a fraction of keys.

Why consistent hashing?

In a normal hash-mod-N scheme, adding a node reshuffles almost every key. Consistent hashing places nodes and keys on a ring, so a topology change only moves the keys that fall between the old and new positions.

The role of virtual nodes

  • With one point per physical node, load is lumpy and small node counts are very unbalanced.
  • Each node gets many virtual points on the ring, so its keys are spread out — variance drops sharply.
  • More virtual nodes → smoother distribution, at the cost of a larger ring table.