What is a key benefit of consistent hashing compared to simple modulo hashing?

Test your Systems Design Concepts knowledge with our comprehensive quiz. Utilize flashcards and multiple choice questions to enhance your study session. Prepare thoroughly with detailed explanations for each answer and ace your examination!

Multiple Choice

What is a key benefit of consistent hashing compared to simple modulo hashing?

Explanation:
Consistent hashing minimizes data movement when the set of nodes changes. With simple modulo hashing, keys are assigned to nodes by hashing the key and taking modulo the number of nodes, so adding or removing a node changes N and can remap almost every key to a different node, causing a large data reallocation. In contrast, consistent hashing places both keys and nodes on a ring and maps each key to the first node clockwise from its hash. When a node is added or removed, only keys that fall into the small segment around that node are moved to neighboring nodes, leaving most mappings intact. This is why only a small fraction of keys get relocated, a major benefit for scalability and fault tolerance. The other statements describe properties that don’t hold for consistent hashing: one implies widespread remapping, another wrongly claims reliance on modulo hashing, and another suggests a fixed cluster size is required.

Consistent hashing minimizes data movement when the set of nodes changes. With simple modulo hashing, keys are assigned to nodes by hashing the key and taking modulo the number of nodes, so adding or removing a node changes N and can remap almost every key to a different node, causing a large data reallocation. In contrast, consistent hashing places both keys and nodes on a ring and maps each key to the first node clockwise from its hash. When a node is added or removed, only keys that fall into the small segment around that node are moved to neighboring nodes, leaving most mappings intact. This is why only a small fraction of keys get relocated, a major benefit for scalability and fault tolerance. The other statements describe properties that don’t hold for consistent hashing: one implies widespread remapping, another wrongly claims reliance on modulo hashing, and another suggests a fixed cluster size is required.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy