Consistent Hashing Visualizer

Explore how consistent hashing places keys on a ring and minimizes remapping when nodes join or leave.

Consistent Hashing Ring

Place nodes and keys on a hash ring. Add or remove a node and watch how few keys remapped compared with naive modulo hashing.

Node Virtual node Key

    Educational model — uses a simple string hash onto a 0–359° ring. Real systems often use 2^32 or 2^128 rings and many more virtual nodes.

    What you are looking at

    • Blue dots are physical nodes (first virtual node highlighted).
    • Gray dots are additional virtual nodes for smoother load.
    • Amber dots are keys; dashed lines point to the owning node (next clockwise).

    Why it matters

    Naive hash(key) % N reshuffles almost every key when N changes. Consistent hashing typically moves only about 1/N of keys when a node is added or removed — critical for caches, databases, and DHT-style systems.