Consistent Hashing easy
How does Consistent Hashing accommodate servers with different capacities (e.g., Node A has 1TB, Node B has 5TB)?
- A By continuously observing the real-time load average and moving the physical node's position to more active areas of the ring.
- B By assigning the higher-capacity servers a proportionally larger number of Virtual Nodes (tokens) on the ring.
- C It cannot effectively accommodate heterogeneity; all servers in the cluster must utilize identical hardware and disk capacities.
- D By daisy-chaining multiple low-capacity servers together to represent a single 'virtual' high-capacity server on the shared ring.
Answer: B. By assigning the higher-capacity servers a proportionally larger number of Virtual Nodes (tokens) on the ring.
Virtual Nodes allow for 'Weighted' balancing. If Server B is 5x more powerful than Server A, we can give it 500 VNodes while Server A gets only 100. Statistically, Server B will capture 5x more of the ring's address space and thus handle 5x more data and requests, allowing for a healthy mixed-hardware cluster.
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?