Skip to main content
Lexicon
Lexicon

Rendezvous Hashing (Highest Random Weight)

Difficulty: Advanced
2 min read

In plain English

Plain definition

Rendezvous hashing scores every candidate node for a key and assigns the key to the highest-scoring node. Because the score is deterministic, clients agree without shared state and only keys owned by a changed node normally need to move.

Rendezvous Hashing (also called Highest Random Weight, HRW) solves the same problem as Consistent Hashing — distributing keys across a dynamic set of nodes with minimal churn on membership change — but with a fundamentally different mechanism. Instead of placing nodes on a hash ring and walking clockwise, every client independently computes hash(key, node_id) for every node in the current membership set and selects the node yielding the maximum value. No shared ring state, no virtual node bookkeeping, and no coordination protocol is required; any client with the current member list arrives at the identical answer.

The critical property is that when a node is added or removed, only the keys that would have hashed highest for that specific node are remapped — statistically 1/N of the keyspace — and every other key-to-node assignment is untouched, matching consistent hashing’s minimal-disruption guarantee but derived from a stateless computation rather than a data structure. This makes it attractive for systems where maintaining a synchronized ring (with virtual node replication factors, rebalancing metadata, etc.) is undesirable, such as client-side sharding in CDN request routing, distributed cache client libraries, or fault-domain-aware load balancer selection.

The naive implementation is O(N) per key lookup since every node’s weight must be computed, which becomes a real bottleneck at high cardinality (thousands of nodes, millions of lookups/sec). Production systems mitigate this with weighted variants for heterogeneous capacity (scoring each node as its weight divided by -ln(h), where h is the hash scaled into the interval (0, 1), so each node wins in proportion to its weight; multiplying the raw hash by the weight does not give proportional shares) and with tree-based or bucketed approximations that reduce the lookup to sub-linear time at the cost of exact HRW semantics. Rendezvous Hashing has been used in practice, for example in the Microsoft Cache Array Routing Protocol (CARP) for selecting a proxy cache server for each URL without shared ring state. Note that Maglev hashing, used in Google’s Maglev load balancer, is a distinct but related lookup-table-based consistent hashing technique, not Rendezvous Hashing.

A subtle edge case: because every participant computes assignments independently from the same membership view, any transient divergence in the membership list (e.g., during a gossip convergence window) causes different clients to disagree on ownership simultaneously — there is no shared source of truth to arbitrate, unlike a centrally-updated hash ring service. This makes Rendezvous Hashing well-suited to read-heavy, cache-like workloads tolerant of brief misrouting, but risky for strongly consistent partitioned storage without an additional consensus layer reconciling membership views.

About this page

Credited to

Dates

Published

Corrections

  • : Corrected during a review of published articles. Details
  • : Corrected during a review of published articles. Details

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

More from KBY that goes with this term.