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.
Start practicing
Sharding — choose a session length
Free · No account required
Domain overview
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.
Exam objectives
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
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.
Click any question to see the full explanation and answer options, or start a focused practice session above.
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?
2Which TWO of the following are primary benefits of implementing sharding in a MongoDB environment?
3A developer chooses Hashed Sharding for a collection. What is a significant limitation of this sharding strategy compared to Ranged Sharding?
4A 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?
5An 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?
6Which THREE components are required to form a functional MongoDB sharded cluster?
7A 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?
8An application executes a query on a sharded collection that does not include the shard key. What is the impact on the cluster performance?
9A multi-document transaction is being executed across multiple shards. Which component is responsible for coordinating the transaction and ensuring the all-or-nothing property?
10A 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?
11An engineering team must shard a high-volume collection tracking global financial transactions. The chosen shard key is based on a timestamp field containing the exact millisecond of each transaction. Why will this specific shard key choice severely degrade cluster write performance over time?
12An administrator needs to distribute a high-throughput collection evenly across a sharded cluster using a hashed shard key. What is the primary characteristic of MongoDB's hashed sharding strategy that makes it effective for preventing write bottlenecks?
13Which THREE components are mandatory architectural parts of every fully functioning MongoDB sharded cluster deployment? Choose 3 answers.
14An administrator notices that the MongoDB balancer is actively migrating chunks during peak business hours, causing noticeable application latency spikes. What is the standard administrative approach to mitigate this performance impact?
15Refer to the exhibit. An administrator inspects chunk metadata for a sharded collection using a compound shard key: { region: 1, account_id: 1 }. What does the presence of MinKey and MaxKey signify in this specific chunk range definition?
16An organization wants to restrict customer data for European Union residents to a specific set of physical servers located in Frankfurt, complying with data residency regulations. Which MongoDB sharding feature should the DBA implement to achieve this?
17When designing a compound shard key in MongoDB, what is the architectural significance of placing a high-cardinality field as the prefix compared to placing a low-cardinality field first?
18During routine cluster maintenance, an administrator needs to remove an underperforming shard from a production MongoDB sharded cluster safely. What is the mandatory first step the administrator must execute?
19Refer to the exhibit. An administrator attempts to execute the shardCollection command but receives the displayed error message. What is the root cause of this failure?
20Which TWO statements accurately describe the behavior and management of orphaned documents in a MongoDB sharded cluster? Choose 2 answers.
21An application issues a find query against a sharded collection without including the shard key in the query filter. How does the mongos query router handle this operation?
22When is it appropriate to use a hashed shard key instead of a ranged shard key in a MongoDB sharded collection?
23An 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?
24A production MongoDB 6.0 sharded cluster has a collection with a ranged shard key on the field `customerId`. Over time, the team notices that nearly all new documents have monotonically increasing `customerId` values, and one shard is receiving a disproportionate share of writes while the other shards remain relatively idle. The balancer is enabled and running. Which of the following is the most likely explanation for this imbalance?
25A MongoDB 6.0 sharded cluster has a collection with a ranged shard key on the field 'customerId'. The balancer has been running normally, but the operations team notices that one shard consistently holds significantly more chunks than the others. They want to understand which internal metadata collection the mongos uses to determine chunk distribution and to verify the current chunk-to-shard mapping. Which collection should they query?
26A financial services company runs a sharded MongoDB cluster with three shards. They need to shard a new collection that stores transaction records. The collection will be queried primarily by 'accountId' and 'transactionDate'. The team wants to minimize scatter-gather queries and ensure even data distribution. Which two actions should they take when choosing and implementing the shard key? (Choose two.)
27A MongoDB DBA is configuring a new sharded cluster. The application requires that queries on the sharded collection include the shard key to avoid scatter-gather. The DBA decides to use a ranged shard key on the field 'region'. After sharding, the DBA notices that queries filtering only on 'region' are performing well, but queries that also filter on 'city' are still scanning all shards. What is the most likely cause?
28A MongoDB 6.0 sharded cluster has a collection sharded with a hashed shard key on 'userId'. The operations team needs to run an aggregation that groups documents by 'userId' and calculates the total transaction amount. They want to know whether the aggregation can be optimized to run only on the shards that contain the relevant 'userId' values. Which statement describes the correct behavior?
29A DBA is troubleshooting a sharded cluster where the balancer is not migrating chunks even though there is an imbalance. The DBA runs `sh.getBalancerState()` and it returns `true`. Which of the following is the most likely reason the balancer is not migrating chunks?
30A MongoDB 6.0 sharded cluster uses a shard key of { region: 1, customerId: 1 } for a global order collection. Most queries filter on customerId only, without region. The operations team observes that nearly every read is a scatter-gather across all shards. What is the most accurate explanation for this behavior?
31A MongoDB DBA is managing a sharded cluster where the collection 'orders' is sharded on the field 'orderDate' using ranged sharding. The DBA needs to add a new shard to the cluster to handle increasing data volume. After adding the shard, the balancer begins migrating chunks. During this migration, the DBA runs a query that includes 'orderDate' and notices increased latency. What is the most likely reason for the increased latency?
32A 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?
33A database administrator is setting up a new sharded cluster and needs to enable sharding on a database named 'sales' before sharding any collections. Which command should be executed on mongos to enable sharding for this database?
34A sharded cluster has a collection sharded on `{ location: 1 }`. A query is executed with the filter `{ location: { $in: ["NY", "CA"] } }`. How does MongoDB route this query?
35A DBA is preparing to shard a collection in a MongoDB 6.0 cluster. The collection currently has no indexes other than the default _id index. The chosen shard key is { userId: 1 }. What must the DBA do before running shardCollection?
36A MongoDB sharded cluster has a collection with a hashed shard key on the field 'userId'. A query is executed that includes an equality condition on userId. How does mongos route this query?
37An administrator notices that the balancer in a MongoDB sharded cluster is repeatedly migrating chunks between two shards, causing performance degradation. The administrator wants to temporarily stop the balancer to investigate. Which command should be used on mongos?
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.
The Courseiva C100DBA question bank contains 37 questions in the Sharding domain. Click any question to see the full explanation and answer breakdown.
Start with a 10-question focused session to identify your baseline accuracy in this domain. Read every explanation — even for questions you answer correctly — to understand the reasoning. Once you score consistently above 80%, move to a 20–30 question session to confirm depth before moving to the next domain.
Yes — the session launcher on this page draws questions exclusively from the Sharding domain. Choose 10, 20, 30, or 50 questions for a focused session, or click individual questions to review them one by one.
Save your results, see per-domain analytics, and get readiness scores — free, for every certification.
Sign Up FreeFree forever · Every certification included