C100DBA Sharding Practice Question
An application requires high write throughput for time-series data indexed by a timestamp field. You observe that all incoming data is being routed to a single shard, creating a write hotspot. Which shard key strategy best resolves this performance bottleneck?
⚠ Common exam trap
Candidates assume that indexing a timestamp field normally prevents hotspots, forgetting that a hashed index is necessary to randomize and distribute sequential writes.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Apply a hashed index to the timestamp field as the shard key.
Using a hashed shard key distributes documents uniformly across all shards in the cluster regardless of the timestamp value. By hashing the shard key, the balancer ensures that contiguous ranges of data are not sent to the same shard. This strategy is critical in MongoDB sharding to prevent write hotspots and ensure that the disk I/O and CPU utilization are evenly balanced across the entire sharded cluster, effectively scaling write operations horizontally.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the timestamp field as a single-field shard key.
Why it's wrong here
A monotonic increasing field like a timestamp creates a primary shard hotspot because all new documents have values higher than existing ones. MongoDB directs all inserts to the shard containing the highest range, preventing horizontal scaling and causing significant performance degradation as the collection grows over time.
- ✗
Implement a range-based shard key using a UUID.
Why it's wrong here
While a UUID provides high cardinality, a range-based strategy on a random field can lead to inefficient queries. Range-based sharding is typically designed for queries that filter by specific ranges. A random UUID range is functionally similar to hashing but lacks the native optimization for data distribution provided by hashed indexes.
- ✓
Apply a hashed index to the timestamp field as the shard key.
Why this is correct
Hashed sharding computes a hash of the shard key value and uses that hash to determine the target shard. This ensures that even when timestamp values are strictly increasing, the documents are distributed randomly across shards, preventing the write hotspot and allowing the application to utilize the full write capacity.
- ✗
Increase the number of mongos instances in the cluster.
Why it's wrong here
Adding more mongos instances increases the number of entry points for client applications but does not change how data is distributed across the shards. The underlying shard key strategy remains the source of the hotspot, and increasing router instances will not alleviate the contention occurring on a single shard.
Visual reference
About these practice questions
One of 222 original C100DBA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official MongoDB exam blueprint
This C100DBA practice question is part of Courseiva's free MongoDB certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the C100DBA exam.