Consistent Hashing medium
Google's 'Jump Consistent Hash' algorithm is faster and uses less memory than ring-based hashing. What is its critical limitation?
- A It requires expensive floating-point arithmetic on every key lookup, making it unsuitable for low-latency embedded systems.
- B It only supports string-based keys and requires a manual internal conversion phase before it can handle standard integer inputs.
- C It cannot handle the removal of arbitrary nodes; only the last added node (the tail) can be removed without causing a massive reshuffle.
- D It suffers from O(N) lookup time because it must iterate through every single valid node index for every individual key request.
Answer: C. It cannot handle the removal of arbitrary nodes; only the last added node (the tail) can be removed without causing a massive reshuffle.
Jump Consistent Hash is extremely efficient (O(log N) and uses zero memory), but it assumes nodes are numbered sequentially (0, 1, 2... N-1). Removing node '4' in a 10-node cluster would break the indexing logic for all subsequent nodes. This makes it ideal for backend clusters with fixed sizes or 'append-only' scaling, but poor for general-purpose distributed caches where random failures are common.
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?