Consistent Hashing easy
In a consistent hashing ring, which server is responsible for storing a specific key?
- A The server currently assigned the highest physical IP address or MAC address within the localized subnet.
- B The server encountered first when moving clockwise from the key's position on the ring (the Successor node).
- C The server identified by the gossip protocol as having the least current number of active client connections.
- D A random server selected by the client application using a cryptographically secure random number generator.
Answer: B. The server encountered first when moving clockwise from the key's position on the ring (the Successor node).
The 'Successor' rule is a deterministic way to assign ownership without a central coordinator. If a key's hash lands at a specific point on the ring, the 'next' server in clockwise order is its owner. If that server fails, the key naturally 'falls' further clockwise to the next available server, making fault tolerance a built-in property of the geometry.
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?