C100DBA Sharding Practice Question
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?
⚠ Common exam trap
Candidates often incorrectly guess that the balancer is configured via a shell command or a server-wide setting, overlooking the specific requirement to modify the config.settings collection directly.
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
✓
Update the config.settings collection with an activeWindow document.
MongoDB allows administrators to define a schedule for the balancer using the settings document in the config database. By setting an activeWindow, you can restrict chunk migrations to periods of low application activity. This prevents the performance overhead of data movement from impacting the user experience during peak hours while still ensuring the cluster stays balanced.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Update the config.settings collection with an activeWindow document.
Why this is correct
The balancer's schedule is controlled by modifying the 'activeWindow' field within the 'balancer' document of the 'config.settings' collection. This document accepts a start and stop time, and the balancer will only perform migrations during this interval, effectively managing the cluster's resource usage during production hours.
- ✗
Use a cron job to call sh.stopBalancer() and sh.startBalancer().
Why it's wrong here
While external scripts can control the balancer, it is not the recommended or native way to manage maintenance windows. Using the built-in activeWindow configuration is more robust and less prone to failure compared to managing external processes that might fail to execute the start or stop commands correctly.
- ✗
Modify the mongod configuration file to include a balancing schedule.
Why it's wrong here
The balancer's operational window is a cluster-wide setting stored in the config servers' metadata, not a parameter in the local mongod configuration files. Changing local config files would not affect the behavior of the balancer, which is a distributed process coordinated by the query routers and config replica set.
- ✗
Set a TTL index on the chunks collection to expire migrations.
Why it's wrong here
TTL indexes are used to automatically remove expired documents from a collection based on a date field. They have no relationship to the balancer's logic or the timing of chunk migrations. Attempting to use a TTL index on internal metadata collections would be dangerous and would not achieve the desired scheduling.
About these practice questions
Courseiva writes every C100DBA question from scratch — 222 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.