Questions: Consistent Hashing

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A distributed cache has 10 servers and uses hash(key) % 10 to assign keys to servers. A new server is added, making 11 total. Approximately what fraction of keys must be remapped?

AAbout 1/11 — only the keys that will belong to the new server need to move
BAbout 1/10 — only the keys on the least-loaded server need to be redistributed
CAbout 90% — changing n from 10 to 11 changes the result of hash(key) % n for nearly every key
D0% — hash functions are stable, so existing key assignments are preserved
Question 2 Multiple Choice

A consistent hashing ring has five servers at widely spaced positions. One server owns 5% of the ring, another owns 60%. Which technique addresses this load imbalance?

AReplicate data from the overloaded server to the underloaded one to balance storage
BAdd more physical servers until ring arcs are approximately equal
CUse virtual nodes — hash each physical server to many ring positions so each server's responsibility is spread across many small arcs
DSwitch to modular hashing, which produces more uniform distribution by design
Question 3 True / False

With consistent hashing, when a node is added to or removed from the ring, only keys in a contiguous arc of the ring need to be reassigned.

TTrue
FFalse
Question 4 True / False

A cluster using consistent hashing will experience a near-total cache miss storm when a node is added, just like modular hashing, because most hash values need to be recomputed.

TTrue
FFalse
Question 5 Short Answer

Explain why consistent hashing is described as 'elastic' — what property makes it fundamentally better suited to horizontally scalable distributed systems?

Think about your answer, then reveal below.