Consistent Hashing easy
In a Consistent Hashing system with Replication Factor = 3, where are the replicas stored?
- A They are stored within a dedicated, centralized archival cluster that is physically isolated from the production ring.
- B They are stored on multiple different physical media types (e.g., HDD, SSD, and Tape) within the same server node.
- C They are stored on the 'Successor' node and the next N distinct physical servers encountered clockwise around the ring.
- D They are distributed to random nodes across the cluster as determined by a real-time, peer-to-peer gossip protocol.
Answer: C. They are stored on the 'Successor' node and the next N distinct physical servers encountered clockwise around the ring.
In a consistent hashing ring, fault tolerance is achieved by 'walking' the ring. If data is stored at node A, its replicas are usually stored on the nodes immediately following A (Successors). This ensures that if node A fails, its successor—which already holds a replica—naturally takes over the traffic for that range with minimal reconfiguration.
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?