Consistent Hashing: The Hash Ring (2D)
2D consistent-hashing lab: place servers and virtual nodes on a hash ring, watch a live clockwise lookup probe find each key's owner, and see exactly which keys move (highlighted) when you add or remove a server.
This 2D companion runs the identical FNV-1a hash-ring algorithm as the 3D version through plain Canvas 2D drawing calls instead of a WebGL scene: a side panel exposes the server count, virtual-node replica count and key count directly as sliders, add/remove buttons trigger a real diff against the previous key→server assignment so only the genuinely remapped keys light up (highlighted white with a red ring), and a continuously animated probe dot walks clockwise around the ring to demonstrate the exact "first virtual node found" lookup rule live — click anywhere on the ring to jump the probe there yourself. A load table tracks each server's share against the ideal 1/N and reports the standard deviation as a percentage, so raising virtual nodes and watching the imbalance shrink is directly observable rather than asserted.
Servers and keys hash via FNV-1a into a 32-bit ring. Each server is placed at V pseudo-random virtual-node positions; a key's owner is the first virtual node found walking clockwise from the key's own hash position, found by binary search over the sorted virtual-node array (O(log(V·N)) lookup). Adding or removing a server rebuilds the virtual-node table and re-resolves every key, then diffs the new owner array against a snapshot taken before the change to compute exactly which keys moved — not an approximation, a real before/after comparison.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install