Which distribution technique minimizes data movement when shards are added or removed by placing shards on a virtual ring and assigning each key to the nearest shard clockwise?

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

Which distribution technique minimizes data movement when shards are added or removed by placing shards on a virtual ring and assigning each key to the nearest shard clockwise?

Explanation:
Consistent hashing. By laying out shards on a virtual ring and mapping each key to the nearest shard clockwise, you create a stable, ring-based partitioning that keeps data movement small when shards are added or removed. When a new shard joins, only the keys that fall between that shard’s position and its predecessor need to move to the new shard; all other keys stay put. When a shard leaves, only the keys on that shard shift to the next one clockwise. This limited data shuffling makes scaling and fault tolerance more efficient. In contrast, range-based sharding ties keys to fixed value ranges, so changing the shard count often requires redistributing large data portions; directory-based sharding relies on a lookup table and doesn’t inherently minimize movement, and hot spots describe uneven traffic rather than how shards are mapped.

Consistent hashing. By laying out shards on a virtual ring and mapping each key to the nearest shard clockwise, you create a stable, ring-based partitioning that keeps data movement small when shards are added or removed. When a new shard joins, only the keys that fall between that shard’s position and its predecessor need to move to the new shard; all other keys stay put. When a shard leaves, only the keys on that shard shift to the next one clockwise. This limited data shuffling makes scaling and fault tolerance more efficient. In contrast, range-based sharding ties keys to fixed value ranges, so changing the shard count often requires redistributing large data portions; directory-based sharding relies on a lookup table and doesn’t inherently minimize movement, and hot spots describe uneven traffic rather than how shards are mapped.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy