Learn the vocabulary of assigning each key to whichever node scores highest, minimizing reshuffling as nodes change.
0 / 5 completed
1 / 5
At standup, a dev mentions assigning each key to whichever node scores highest under a combined hash of the key and that node's identifier, so adding or removing one node only reshuffles the keys that were mapped to that specific node. What is this technique called?
Rendezvous hashing is exactly this: rendezvous hashing, also called highest random weight hashing, assigns each key to whichever node scores highest under a combined hash of the key and that node's identifier, computed independently for every candidate node, so adding or removing a single node only reshuffles the keys that scored highest for that specific node, leaving every other key's assignment untouched. A hash collision is an unrelated hash-table concept about two keys sharing a bucket. This highest-scoring-node-per-key approach is exactly why rendezvous hashing minimizes key reshuffling when the set of nodes changes, without needing a ring structure at all.
2 / 5
During a design review, the team uses rendezvous hashing to distribute cache keys across a set of nodes that occasionally scales up or down, specifically because computing a per-node score for each key independently means adding or removing one node only reshuffles the keys that scored highest for that node, not the whole keyspace. Which capability does this provide?
Rendezvous hashing here provides Minimal key reshuffling when the node set changes, with no ring structure required, since since each key's node assignment is decided purely by comparing independent per-node scores, removing or adding one node only affects the keys that scored highest for that specific node, leaving every other key's assignment completely untouched, unlike a naive scheme that rehashes every key relative to the current node count. A naive scheme that rehashes every key modulo the current node count reshuffles nearly the entire keyspace whenever the node count changes. This minimal-reshuffling behavior is exactly why rendezvous hashing, alongside consistent hashing, is favored for distributing keys across a node set that changes size over time.
3 / 5
In a code review, a dev notices a cache-key-distribution feature reassigns keys to nodes using a simple modulo of the key's hash by the current node count, so adding or removing a single node reshuffles nearly the entire keyspace, instead of using an independent per-node scoring scheme. What does this represent?
This is a missed rendezvous-hashing opportunity, since using rendezvous hashing's independent per-node scoring would let adding or removing one node reshuffle only the keys that scored highest for that node, instead of reshuffling nearly the whole keyspace. A cache eviction policy is an unrelated concept about discarded cache entries. This modulo-by-node-count pattern is exactly the kind of unnecessary reshuffling a reviewer flags once the node set is known to scale up or down over time.
4 / 5
An incident report shows a cache-key-distribution feature caused a massive wave of cache misses every time a node was added or removed, because it distributed keys with a simple modulo of the current node count instead of an independent per-node scoring scheme. What practice would prevent this?
Switching to rendezvous hashing's independent per-node scoring eliminates the wave of unnecessary cache misses. Continuing to distribute keys with a simple modulo of the current node count regardless of how often the node set actually scales up or down is exactly what caused the issue described in this incident. This rendezvous-hashing approach is the standard fix once the node set is confirmed to change size often enough for reshuffling cost to matter.
5 / 5
During a PR review, a teammate asks why the team reaches for rendezvous hashing instead of consistent hashing, given that consistent hashing is also designed to minimize key reshuffling when nodes are added or removed. What is the reasoning?
Rendezvous hashing computes an independent score per node for each key, needing no ring structure at all, while consistent hashing places both nodes and keys on a hash ring and typically needs virtual nodes to balance load evenly, adding some extra bookkeeping that rendezvous hashing avoids. This is exactly why both techniques minimize key reshuffling when the node set changes, differing mainly in implementation simplicity versus ring-based tooling.