Sharding Activity
The Sharding Activity view is where you manage sharded MongoDB clusters end-to-end: mongos routers, the config-server replica set, and the underlying shard replica sets. From one page you can enable sharding on a database, shard a collection, inspect chunk distribution, watch the balancer move data around, and read moveChunk history.
The Sharding Activity view requires a connection that points to a mongos router. Sharding cannot be administered from a shard's replica set directly. Add a mongos connection in the Connection Manager before opening this view.
The topology view lays out the cluster as three tiers:
Each node is drawn as a card with health chips (see Replica Set Fleet for chip colors). Lines connect routers to config servers and config servers to shards, so partitioning problems are visible at a glance. Click any shard to open its replica-set monitor.
Before a database's collections can be sharded, sharding must be enabled at the database level.
sh.enableSharding("<db>") and refreshes the topology.Sharding a collection distributes its documents across shards using a shard key. VisuaLeaf's Shard collection dialog walks you through the choices step by step.
| Strategy | When to use | Trade-offs |
|---|---|---|
Hashed |
Even write distribution across shards; keys with monotonic values (like ObjectId or timestamps) |
Range queries on the shard key must scatter-gather across shards |
Ranged |
Range queries on the shard key are common; data has natural locality (e.g. tenantId) |
Monotonic keys create a single "hot" shard; needs careful key design |
Compound Ranged |
Combine a locality field (tenantId) with a distributing field (_id) |
Most flexible but the shard key becomes immutable — plan carefully |
The dialog previews the resulting shardCollection command before executing it, and refuses to proceed if the required supporting index does not exist yet (offering to create it for you).
Zones (formerly called tags) pin ranges of the shard key to specific shards. Common uses:
The Zones tab lists every zone, the shards tagged with it, and every zone-range currently mapped. You can add zones, tag shards, and add or drop ranges directly from the UI — VisuaLeaf translates each action into the equivalent sh.addShardTag, sh.updateZoneKeyRange, or sh.removeRangeFromZone command.
The chunk browser answers "how is my data actually distributed right now?"
min, max, shard, lastmod, and estimated size.A chunk is marked jumbo when it exceeds the configured chunk size (default 128 MB) and cannot be split because every document inside has the same shard-key value. Jumbo chunks are the classic sign of a poorly-chosen shard key with too little cardinality. Options:
refineCollectionShardKey to append a suffix field.VisuaLeaf will not attempt to auto-split jumbo chunks — the safe fix is at the shard-key level, not the chunk level.
The balancer moves chunks between shards to keep the distribution even. The status panel shows:
running, stopped, or disabled.moveChunk is in flight right now, and for which collection.The moveChunk tab reads config.changelog and presents the history of chunk migrations: source shard, destination shard, key range, duration, and whether the migration succeeded or aborted. Sorting by duration surfaces slow migrations that may point to network or WT-cache issues; filtering by collection shows which collections the balancer is spending its time on.
Download and start managing your MongoDB databases with ease.
Download Free Trial