A shard key influences distribution and query routing. Good cardinality alone does not guarantee balanced writes or targeted reads.
Before you start
You should understand documents, collections and indexes. Sketch representative documents and the reads and writes they must support. MongoDB-specific examples assume a collection with the shown fields; deployment topology, permissions and existing indexes can affect the operational behavior being discussed.
The practical goal is to reason through this situation: A monotonically increasing key can concentrate new writes in a narrow range. Read the walkthrough first, then try the interview exercise before opening its answer. The important part is explaining the decision and its consequences, rather than remembering a definition alone.
Step-by-step walkthrough
Step 1: Map query routing
List common filters and whether they can target shards.
Step 2: Inspect write concentration
High cardinality does not prevent a monotonically growing hot range.
Step 3: Evaluate future growth
Balance distribution, locality and changing tenant workloads together.
Worked scenario
A monotonically increasing key can concentrate new writes in a narrow range.
A timestamp shard key spreads historical ranges but new inserts concentrate at the latest end. A more distributed key can reduce that hotspot while scattering tenant queries. Neither dimension alone decides the design; include write rates, tenant size distribution and operational growth expectations.
Common mistake
Random distribution can scatter common tenant queries across shards.
Verify the behavior
Measure routing and per-shard load for representative skewed workloads.
Interview exercise
Evaluate a shard key.
Answer and reasoning
Measure write concentration, common filters, growth and routing behavior together, including future workload changes.
Continue learning
Compare the scenario with the MongoDB interview questions and test your understanding with the MongoDB MCQs. For terminology and implementation details, consult the reference material.