What is a major downside of simple hash-based sharding without consistent 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 major downside of simple hash-based sharding without consistent hashing?

Explanation:
The key idea is that simple hash-based sharding maps keys to shards using a hash modulo the number of shards. When the number of shards changes—adding or removing a shard—the modulo result changes for many keys, so many items get assigned to different shards. That means you must move a large portion of the data to re-balance, which is costly and disruptive. This is exactly why adding or removing shards leads to migrating most of the data in a non-consistent hashing scheme. Consistent hashing avoids this by mapping keys to positions on a ring and only moving a small fraction of keys when the topology changes. So the correct takeaway is that changing the shard count alters the modulo for most keys, causing widespread data movement. The other statements don’t capture that large-scale relocation that happens with simple modulo-based hashing.

The key idea is that simple hash-based sharding maps keys to shards using a hash modulo the number of shards. When the number of shards changes—adding or removing a shard—the modulo result changes for many keys, so many items get assigned to different shards. That means you must move a large portion of the data to re-balance, which is costly and disruptive. This is exactly why adding or removing shards leads to migrating most of the data in a non-consistent hashing scheme. Consistent hashing avoids this by mapping keys to positions on a ring and only moving a small fraction of keys when the topology changes.

So the correct takeaway is that changing the shard count alters the modulo for most keys, causing widespread data movement. The other statements don’t capture that large-scale relocation that happens with simple modulo-based hashing.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy