Rendezvous Hashing
Assign keys to nodes with minimal movement, simple ranking, and natural support for replicas and capacity weights.
2–5 minute refresher
ABC12345678
NodeKey
Add a node → move one slice, not every key.
Every key independently ranks the same node list; the highest-scoring eligible nodes own it.
30second
refresher
refresher
Highest Random Weight, or rendezvous hashing, computes a deterministic score for each key-node pair. The node with the highest score owns the key; the next scores provide replica placement.
What problem does it solve?
Modulo hashing remaps most keys when membership changes. Ring-based hashing limits movement but introduces tokens, virtual nodes, and ring-management complexity.
How it works
- Combine the key and each eligible node ID.
- Hash each pair into a stable score.
- Apply capacity or locality weighting if needed.
- Choose the top score for primary ownership.
- Choose the next distinct failure domains for replicas.
Decision guide
Key trade-offs
| Choice | What you gain | What it costs |
|---|---|---|
| Score every node | Simple and exact placement | O(nodes) lookup |
| Candidate subsets | Faster large-fleet lookup | More design complexity |
| Weighted scores | Capacity-aware balance | Weight changes move data |
What happens if?
Membership views disagree
Two clients rank different node sets and route the same key to different owners. Deterministic hashing cannot compensate for inconsistent membership or stale failure-domain metadata.
Where it appears
- CDN caches
- Sharded services
- Storage placement
- Load balancers
Senior interview modeWhen would you prefer rendezvous hashing over a hash ring?Show answer
When the node set is modest, ranking simplicity matters, or replica selection and weighted placement are first-class. Rings can be preferable when node counts are enormous and optimized lookup structures already exist.