As mentioned earlier in the previous chapter, the chunk is the lowest block of data the sharded cluster balancer can manage. Normally, the sharded cluster balancer automatically creates a new chunk when it has grown past the default (or assigned) chunk size. The default chunk size is 64 megabytes (MB). Documents are then migrated between chunks until a balance occurs. Further, with zone-to-shard assignments in mind, the balancer also migrates chunks between shards to maintain a balanced load.Â
There are several approaches to managing chunk size: adjusting the chunk size, which triggers the automatic balancing process; or, manually splitting chunks. Let's now have a look at adjusting the chunk size.