Consistent Hashing medium
How does Rendezvous Hashing (Highest Random Weight) differ from Consistent Hashing (Ring)?
- A It utilizes a centralized master coordinator to handle all initial routing decisions and node-to-key mapping requests.
- B It is an inconsistent hashing algorithm that provides zero stability guarantees when nodes are added or removed from the cluster.
- C It is significantly faster for very large clusters because it eliminates the need for binary search operations during the lookup phase.
- D It is stateless; for every key, it independently calculates a weight for all nodes and selects the highest, avoiding the need for a shared ring.
Answer: D. It is stateless; for every key, it independently calculates a weight for all nodes and selects the highest, avoiding the need for a shared ring.
Rendezvous Hashing (HRW) is stateless, meaning you only need the current list of nodes to determine where a key belongs. It calculates `Hash(Key + Node_i)` for every node and picks the maximum. While this ensures perfect distribution and handles node changes gracefully, it requires O(N) computation per lookup, making it more CPU-intensive than Ring Hashing (O(log N)) for massive clusters.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- In a 'Smart Client' architecture (e.g., modern Cassandra drivers), how does the client find the right node?
- When a new node (Node X) joins the ring, where does it acquire its initial data from?
- Google's Maglev hashing algorithm (used in their Network Load Balancers) differs from standard Consistent Hashing rings. How does it generate the lookup table?
- Virtual Nodes improve balance but increase metadata size (Memory). How does 'Multi-Probe Consistent Hashing' achieve good balance without VNodes?
- In the Chord DHT protocol (a P2P consistent hashing implementation), naive lookups are O(N). How does Chord optimize this to O(log N)?
- Which of these systems is a famous user of Consistent Hashing?