Courseiva
Sharding →hardMultiple Choice

C100DBA Sharding Practice Question

A financial services company shards a transactions collection using a ranged shard key on an incrementing timestamp field. Over several months, the cluster develops a single hot shard that receives almost all writes, while the other shards remain nearly idle. Which change best addresses the root cause while preserving efficient range queries on timestamp?

⚠ Common exam trap

The trap here is believing that hashed sharding on the timestamp alone is acceptable, when it actually eliminates the efficient range-query capability the application requires.

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

✓

Use a compound shard key that combines a low-cardinality prefix such as a hash of the timestamp bucket with the timestamp, or apply a bucketing strategy to spread inserts.

A monotonically increasing shard key concentrates all inserts in the highest chunk, creating a single hot shard regardless of cluster size. Introducing a hashed or bucketed prefix spreads writes across many chunks and shards, while retaining timestamp as a suffix preserves efficient range queries. This combination solves the imbalance without sacrificing the query pattern the application depends on.

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 a compound shard key that combines a low-cardinality prefix such as a hash of the timestamp bucket with the timestamp, or apply a bucketing strategy to spread inserts.

    Why this is correct

    Adding a hashed or bucketed prefix distributes inserts across many chunks while preserving the timestamp as a suffix for range queries on time. This directly targets the monotonic write hotspot, keeps the cluster balanced, and still allows efficient range scans because the timestamp remains part of the key and can be used with the prefix for pruning.

  • ✗

    Enable the balancer and lower the chunk size to 32 MB so chunks migrate more aggressively during peak hours.

    Why it's wrong here

    The balancer already migrates chunks, but with a monotonically increasing key all new writes land in the highest chunk regardless of chunk size. Smaller chunks increase migration overhead and can worsen performance without moving the write hotspot. The root cause is the monotonic key, not chunk size or balancer activity.

  • ✗

    Convert the shard key to a hashed key on timestamp, which spreads writes evenly across shards and keeps range queries efficient.

    Why it's wrong here

    Hashed sharding distributes writes well, but it destroys the ability to do efficient range queries on timestamp because adjacent timestamps hash to unrelated shards. Range queries then become scatter-gather operations. This solves the write hotspot but breaks the range-query requirement, so it is not the best fit for the stated constraints.

  • ✗

    Add more shards to the cluster so the hot shard's load is diluted across a larger number of nodes.

    Why it's wrong here

    Adding shards does not fix a monotonic shard key; all new writes still target the single highest chunk, which lives on one shard. The hotspot simply persists on whichever shard owns that chunk. More shards increase operational overhead without redistributing the write pattern, so this does not address the root cause.

About these practice questions

This C100DBA question is part of Courseiva's 222-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.