Consistent Hashing hard
When walking the ring to find 3 replicas, standard Consistent Hashing might pick 3 nodes in the same Rack. How is Rack Awareness typically implemented in the Ring walk?
- A The ring walk continues clockwise but skips any node that belongs to a Rack ID already present in the current replica preference list.
- B The system initializes a separate, dedicated hash ring for each physical rack to ensure that data never leaves its localized failure domain.
- C The nodes are pre-sorted by Rack ID before being hashed to ensure that no two adjacent points on the ring can ever share a rack.
- D It relies on the mathematical probability that random placement will naturally spread replicas across different physical racks at scale.
Answer: A. The ring walk continues clockwise but skips any node that belongs to a Rack ID already present in the current replica preference list.
High Availability requires physical diversity. If Node A (Rack 1) is the owner, the 'Preference List' walk won't just take the next guy if he's also in Rack 1. It keeps walking the ring until it finds a node in Rack 2, and then Rack 3. This guarantees that a single top-of-rack switch failure cannot take out all copies of your data.
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?