Consistent Hashing easy
Which of these systems is a famous user of Consistent Hashing?
- A The core logic of Redis Cluster, which uses a simplified hash-slot mapping to manage its distributed data partitioning.
- B The local storage engine of SQLite, which uses hashing to optimize the search for records within a single database file.
- C A standard PHP Session handler, which traditionally uses a fixed round-robin approach to distribute user data across file volumes.
- D Discord's Gateway Service, which uses it to route millions of concurrent users to the correct real-time voice and message nodes.
Answer: D. Discord's Gateway Service, which uses it to route millions of concurrent users to the correct real-time voice and message nodes.
Discord is a high-profile user of consistent hashing to ensure that users are pinned to the correct gateway servers with minimal reshuffling during updates. Other famous examples include Amazon's Dynamo system, Apache Cassandra, and the original implementation of the Memcached distributed client (libketama).
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)?
- If you reside a cluster from 10 to 11 nodes using Modulo Hashing, what happens?