Consistent Hashing easy
When a node crashes in a Consistent Hashing ring, which other nodes are affected?
- A The entire cluster must pause operations to perform a global re-balancing and re-hashing of all stored data.
- B The immediate clockwise neighbor (Successor) becomes responsible for the keys previously owned by the failed node.
- C There is no localized effect on neighboring nodes; the data is considered permanently lost until recovered from tape.
- D Only the immediate predecessor node is affected, as it must now buffer all incoming writes for the dead node's range.
Answer: B. The immediate clockwise neighbor (Successor) becomes responsible for the keys previously owned by the failed node.
Because the ring is circular and deterministic, if a server disappears, the keys it once owned simply 'skip' over its position and fall to the next server clockwise (the successor). This ensures that failures are localized and only affect the immediate neighbor, rather than requiring a cluster-wide reorganization.
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?