<!-- llms-explorer concept facts · https://llms-explorer.com/tree/balancer-windows-and-per-collection-balancing-control/ · pack 2026-10-31 · ~1650 tokens -->

# Balancer windows and per-collection balancing control

> Source-anchored research for Balancer windows and per-collection balancing control. Run status: COMPLETED.

Parent: [Long-running secondary reads in sharded clusters](https://llms-explorer.com/tree/long-running-secondary-reads-in-sharded-clusters/) · 6 facets · 16 facts · page: https://llms-explorer.com/tree/balancer-windows-and-per-collection-balancing-control/

## Definitions

- Read config.collections for the collection namespace and inspect noBalance: true means balancing is disabled; false or an absent field means it is enabled. A missing namespace must not be interpreted as an enabled collection. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)

## How it works

- A balancing window must leave enough time to process the required redistribution. Restricting it too aggressively or leaving balancing disabled can accumulate shard imbalance and harm performance; restore collection balancing when its temporary workload ends. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- Operational inference: scheduling automatic balancing outside a long-read interval can reduce overlap with migration workload, because migrations consume source reads and destination writes. This scheduling choice is not evidence that every long secondary read will complete. (medium confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- MongoDB 8.3 supports weekday-specific balancing windows through activeWindowDOW. When activeWindowDOW and activeWindow both exist, the weekday-specific configuration takes precedence. The 8.3 downgrade notes say day-of-week schedules no longer apply after downgrade and the balancer falls back to activeWindow. (medium confidence) (verified as of 2026-10-14) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- In MongoDB 7.0 and later, AutoMerger participates in balancing operations; when a balancing window is configured it runs only within that window. Collection-level AutoMerger controls provide a separate way to disable automatic merges. (high confidence) — [source](https://www.mongodb.com/docs/manual/core/automerger-concept.md)

## How-to and procedures

- Configure a daily cluster-wide balancing window by updating the config.settings document with _id "balancer" and activeWindow containing start and stop values in HH:MM format. The balancer must also be enabled; setting a window does not override its stopped state. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- Use sh.disableBalancing("database.collection") and sh.enableBalancing("database.collection") through mongos to control one collection. Disabling that collection leaves other collections eligible for automatic balancing. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- Check collection state through config.collections for the namespace: noBalance: true means balancing is disabled. Separately distinguish cluster permission to run, reported by sh.getBalancerState(), from current activity, reported by sh.isBalancerRunning(); an enabled balancer can be idle. (low confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)

## Problems, failure modes and limitations

- SERVER-72820 documents a test-helper failure mode: awaitCollectionBalance changed collection balancing through config.collections writes that needed retry handling for notPrimary errors during config-server stepdown. The issue records a fix version of 7.0.0-rc0; it does not establish a current production bug. (low confidence) — [source](https://jira.mongodb.org/browse/SERVER-72820)

## Comparisons and alternatives

- sh.getBalancerState() indicates whether balancing is enabled, rather than whether data is currently migrating. Check actual balancer activity separately with sh.isBalancerRunning(); its return representation can depend on the shell. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- The current manual describes activeWindowDOW as an array of named-day windows, including multiple windows per day, and says it takes precedence over activeWindow. SERVER-82487 records the day-of-week feature with fix version 8.3.0-rc0; treat this as version-specific rather than an option available on all older releases. (high confidence) (verified as of 2025-12-22) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- For a selected collection, run sh.disableBalancing('database.collection') through mongos before its maintenance or atypical workload, and sh.enableBalancing('database.collection') afterward. Disabling does not interrupt in-progress migrations; enabling permits future balancing rather than immediately forcing redistribution. (low confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)

## Facts and statements

- Disabling balancing on a collection does not interrupt migrations already in progress. Enabling balancing again does not immediately redistribute data; the collection becomes eligible for later balancing activity. (low confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- Time-zone assumptions are deployment-specific: the MongoDB manual evaluates self-managed windows in the config-server primary's time zone and Atlas windows in UTC, whereas Alibaba documents ApsaraDB window times in the instance region's local time zone. (high confidence) (verified as of 2026-10-30) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- The balancing window must be long enough to handle the deployment's accumulated balancing work. A very short window or prolonged disabling can leave shards unbalanced and degrade cluster performance. (high confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
- Upstream MongoDB documents sh.stopBalancer() as allowing an in-progress migration to finish before stopping. Therefore a pause request is not evidence of instantaneous migration quiescence; verify activity before beginning a protected workload. (low confidence) — [source](https://www.mongodb.com/docs/manual/tutorial/manage-sharded-cluster-balancer.md)
