Maglev hashing interactive simulator. A fixed-size lookup table of M slots is filled by a round-robin draft: each backend repeatedly claims its most-preferred free slot until the table is full. Key lookup is then hash(key) mod M, read the table cell — O(1). Play the draft, change M, or remove a backend to see the table rebuild.
Maglev hashing (Google, 2016) precomputes a fixed-size lookup table of M slots. Each backend has a pseudorandom preference list — the order it would pick slots if it could. The table fills via a round-robin draft: backends take turns claiming their most-preferred unclaimed slot until every slot is full. Lookup is then hash(key) % M → table[slot] → backend — pure O(1).
Table size (M, prime):
production uses ~65537
Lookup tableM=13 · 3 backends
Click Play draft to watch the table get filled
Backends · their preferences and slots
O(1) key lookup
Click any key above to see hash(key) mod M → slot → backend
vs ring · HRW · jump: O(1) lookup (fastest) · very even balance · bounded disruption (~slightly worse than jump) · uses O(M) memory · powers Google's load balancer