TableCore

Sharded clusters

The balancer, how the data is spread, and what is stopping it from moving.

The section appears only where a cluster exists. On a standalone server or a replica set the capability is ruled out from the topology and the panel draws nothing at all.

Balance is measured in bytes where it can be

Chunk count is a poor substitute for balance

Chunks are not the same size. A cluster can be perfectly balanced by chunk count and badly tilted in bytes — one recorded cluster has a single chunk per shard and three quarters of the data on one of them.

Where the server reports the sharded data distribution, the assessment is made in bytes. Where it does not, the panel says that it is showing chunk counts rather than letting you assume it is showing data.

Chunks are counted on the server, with an aggregation. On a cluster with a hundred thousand chunks, pulling them to the client in order to count them would cost more than the imbalance being reported.

Three things that make an imbalance permanent

Each gets its own sentence, because each has a different fix:

ConditionWhat it means
The balancer is stoppedNothing will move until it is started
A shard is drainingChunks leave one at a time; the imbalance is intentional and temporary
A jumbo chunkThe balancer has given up moving it. Until somebody splits it, it stays where it is

Jumbo chunks are counted per shard, because which shard is blocked by one is the actionable part.

The balancing window from the cluster configuration is part of the state too: a balancer that is enabled outside its window moves nothing and looks exactly like a broken one.

Sharded database is not sharded collection

These are different things and confusing them explains a surprising amount of strange performance.

An unsharded collection lives entirely on its database's primary shard, no matter how many shards the cluster has. So a database can be "on a sharded cluster" while one of its collections is a single-server collection with a single server's throughput.

The panel lists databases with their primary shard and says this outright.

Permissions

Reading the cluster configuration and asking the balancer for its status are two different privileges. Being refused one leaves the other.

What is not here

The busiest-collections view is absent on a cluster — not shown as an empty table, but absent. The command behind it is a mongod command that does not work through a mongos, so there is nothing to draw and no permission that would change that.

  • Server metrics — including why a router reports no concurrency limit.
  • Current operations — where an operation identifier from a cluster is a string like shard01:86018, and why that matters.