Courseiva

C100DBA · topic practice

Sharding practice questions

This domain covers MongoDB sharded cluster operations: chunk balancing, shard removal, mongos query routing, and shardCollection prerequisites. Questions are scenario-based, asking you to diagnose balancer-induced latency, identify mandatory pre-removal steps, predict mongos behavior for non-shard-key queries, and explain shardCollection command errors.

Courseiva uses original exam-style practice questions designed for learning and revision. The goal is to understand the concepts, recognise exam patterns, and improve through explanations — not memorise copied exam dumps.

Editorial oversight:Johnson Ajibi· MSc IT Security, IEEE Senior Member
20 questionsDomain: Sharding

What the exam tests

What to know about Sharding

Be able to configure balancer windows, execute removeShard and verify draining, and predict mongos routing for shard-key vs non-shard-key queries. The single most important thing: know that non-shard-key queries broadcast to every shard, causing scatter-gather latency.

Balancer window configuration and chunk migration scheduling via mongos and config servers

Safe shard removal workflow: draining chunks with removeShard before physical decommission

mongos scatter-gather routing for queries lacking the shard key (targeted vs broadcast)

shardCollection prerequisites: shard key index, hashed vs ranged keys, and cluster state

Watch out for

Common Sharding exam traps

  • ▸Assuming the balancer can be disabled per-collection; it operates at the cluster level and affects all sharded collections.
  • ▸Removing a shard's host before running removeShard, which leaves orphaned chunks and an inconsistent cluster state.
  • ▸Believing a query without the shard key fails; mongos broadcasts to all shards and merges results, which is slow but valid.

Practice set

Sharding questions

20 questions · select your answer, then reveal the explanation

Question 1mediummulti select
Read the full Sharding explanation →

When selecting a shard key for a new collection, which TWO of the following rules must be followed?

Question 2mediummulti select
Read the full Sharding explanation →

Starting in MongoDB 4.4, you can refine a shard key by adding suffix fields to the existing key. Which TWO conditions must be met for this operation to succeed?

Question 3mediummultiple choice
Read the full Sharding explanation →

What occurs when a chunk in a sharded collection exceeds the maximum configured chunk size?

Question 4hardmulti select
Read the full Sharding explanation →

Which TWO actions should a database administrator perform before executing the shardCollection command on an existing populated MongoDB collection? Choose 2 answers.

Question 5hardmulti select
Read the full Sharding explanation →

Which THREE statements are true regarding the behavior and mechanics of the MongoDB cluster balancer? Choose 3 answers.

Question 6mediummultiple choice
Read the full Sharding explanation →

Why is it critical to select a shard key that cannot be changed after a collection has been sharded in MongoDB?

Question 7mediummultiple choice
Read the full Sharding explanation →

A production MongoDB 6.0 sharded cluster is running with three shards. An administrator needs to add a fourth shard to the cluster to handle increasing data volume. The new shard is a three-member replica set named rs4. Which sequence of commands will correctly add the new shard to the cluster?

Question 8hardmulti select
Read the full Sharding explanation →

A DBA is configuring a new sharded cluster and must choose a shard key for a collection that stores IoT sensor readings. The collection will have high insert volume and queries will often filter by `deviceId` and a timestamp range. The team wants to avoid write hotspots and support efficient range queries on timestamp. Which two shard key strategies should the DBA consider? (Choose two.)

Question 9hardmulti select
Read the full Sharding explanation →

A sharded collection uses a ranged shard key on the field {region: 1, customerId: 1}. An application frequently runs queries that filter only on customerId without including region. Which TWO statements accurately describe the behavior and recommended remediation? (Choose two.)

Question 10hardmultiple choice
Read the full Sharding explanation →

A MongoDB 6.0 cluster has a sharded collection with a shard key of { accountId: 1 }. The DBA needs to split a large chunk that covers accountId values from 1000 to 5000 into two chunks at the midpoint 3000, but the balancer is currently running and the cluster is under heavy load. Which approach correctly performs the split with minimal impact?

Question 11mediummultiple choice
Read the full Sharding explanation →

A company stores IoT sensor data with a high ingestion rate. They use a monotonically increasing timestamp as the shard key. What is the most likely performance bottleneck for this cluster?

Question 12easymulti select
Read the full Sharding explanation →

Which TWO of the following are primary benefits of implementing sharding in a MongoDB environment?

Question 13mediummultiple choice
Read the full Sharding explanation →

A developer chooses Hashed Sharding for a collection. What is a significant limitation of this sharding strategy compared to Ranged Sharding?

Question 14mediummultiple choice
Read the full Sharding explanation →

A DBA needs to ensure that chunk migrations only occur during a specific maintenance window from 02:00 to 04:00. Which configuration change is required?

Question 15hardmultiple choice
Read the full Sharding explanation →

An application serves users in Europe and North America. The DBA wants to ensure that European user data stays on shards located in Europe to comply with data residency laws. Which feature should be used?

Question 16easymulti select
Read the full Sharding explanation →

Which THREE components are required to form a functional MongoDB sharded cluster?

Question 17mediummultiple choice
Read the full Sharding explanation →

A collection has a 'status' field with only three possible values: 'active', 'pending', and 'closed'. Why is 'status' a poor choice for a shard key by itself?

Question 18mediummultiple choice
Read the full Sharding explanation →

An application executes a query on a sharded collection that does not include the shard key. What is the impact on the cluster performance?

Question 19hardmultiple choice
Read the full Sharding explanation →

A multi-document transaction is being executed across multiple shards. Which component is responsible for coordinating the transaction and ensuring the all-or-nothing property?

Question 20mediummultiple choice
Read the full Sharding explanation →

A sharded cluster has a three-member replica set for its config servers. If two of the three config servers go offline, what is the immediate impact on the cluster's operations?

Free account

Track your progress over time

Create a free account to save your results and see which topics improve across sessions.

Focused Sharding sessions

Start a Sharding only practice session

Every question in these sessions is drawn from the Sharding domain — nothing else.

Related practice questions

Related C100DBA topic practice pages

Move into related areas when this topic feels solid.

Frequently asked questions

What does the C100DBA exam test about Sharding?
Be able to configure balancer windows, execute removeShard and verify draining, and predict mongos routing for shard-key vs non-shard-key queries. The single most important thing: know that non-shard-key queries broadcast to every shard, causing scatter-gather latency.
How should I use these practice questions?
Select your answer before revealing the explanation. Then read why each option is right or wrong — this active recall approach builds retention far faster than re-reading notes.
Can I practise just Sharding questions in a focused session?
Yes — the session launcher on this page draws every question from the Sharding domain. Use a 10-question session first to gauge your baseline, then move to 20 or 30 once the weak spots are clear.
Where can I practise other C100DBA topics?
Use the topic links above to move to related areas, or go back to the C100DBA question bank to see all topics.
Are these real exam questions or dumps?
These are original practice questions written to test the same concepts the C100DBA exam covers. They are not copied from any real exam or dump site.