Which property makes a good shard key?

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 property makes a good shard key?

Explanation:
A good shard key should distribute data and load evenly while keeping related data nearby for common queries. High cardinality means many distinct values across records, so the data spreads across many shards rather than stacking into a few; this reduces hotspots and helps scale as the dataset grows. An even distribution ensures no single shard becomes a bottleneck, keeping performance consistent. When the shard key aligns with typical queries, those queries can be served from a single shard or just a few, minimizing cross-shard traffic and latency. Low cardinality hurts because it creates skew and hotspots; claiming any field can be used ignores the real impact of distribution; and keys that always hit all shards force every query to touch every shard, which destroys the benefits of sharding.

A good shard key should distribute data and load evenly while keeping related data nearby for common queries. High cardinality means many distinct values across records, so the data spreads across many shards rather than stacking into a few; this reduces hotspots and helps scale as the dataset grows. An even distribution ensures no single shard becomes a bottleneck, keeping performance consistent. When the shard key aligns with typical queries, those queries can be served from a single shard or just a few, minimizing cross-shard traffic and latency. Low cardinality hurts because it creates skew and hotspots; claiming any field can be used ignores the real impact of distribution; and keys that always hit all shards force every query to touch every shard, which destroys the benefits of sharding.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy