What is a key weakness of simple modulo hashing when cluster size changes?

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 weakness of simple modulo hashing when cluster size changes?

Explanation:
Simple modulo hashing assigns a key to a node by hashing the key and taking the remainder modulo the number of nodes. The weakness shows up when the cluster size changes: the modulus changes for nearly all keys, so most keys end up mapping to different nodes and you must migrate a large amount of data. That makes it very brittle in dynamic environments. In contrast, using a hash ring (consistent hashing) minimizes remapping when nodes join or leave, avoiding massive data movement. Also, simple modulo hashing doesn’t inherently prevent hot spots; if key distribution is uneven, some nodes can become overloaded.

Simple modulo hashing assigns a key to a node by hashing the key and taking the remainder modulo the number of nodes. The weakness shows up when the cluster size changes: the modulus changes for nearly all keys, so most keys end up mapping to different nodes and you must migrate a large amount of data. That makes it very brittle in dynamic environments. In contrast, using a hash ring (consistent hashing) minimizes remapping when nodes join or leave, avoiding massive data movement. Also, simple modulo hashing doesn’t inherently prevent hot spots; if key distribution is uneven, some nodes can become overloaded.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy