Consistent Hashing easy
In a 'Smart Client' architecture (e.g., modern Cassandra drivers), how does the client find the right node?
- A It performs a DNS lookup to a centralized API Gateway that acts as a proxy for all cluster-wide data requests.
- B It broadcasts the request to every single node in the cluster and accepts the first successful response it receives.
- C It maintains a local copy of the Ring Map and independently calculates the hash to route requests directly to the correct IP.
- D It relies on standard DNS round-robin routing to distribute load evenly across all available healthy node addresses.
Answer: C. It maintains a local copy of the Ring Map and independently calculates the hash to route requests directly to the correct IP.
By putting the hash ring logic into the client driver (Token-Aware routing), the application can achieve 'Zero-Hop' routing. This eliminates the need for an intermediate load balancer or proxy, reducing both network latency and the potential for a centralized bottleneck during high traffic windows.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- 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?
- If you reside a cluster from 10 to 11 nodes using Modulo Hashing, what happens?