MongoDB sharding seems is not distributing the documents

Wild adventure @Kasir_Barati

Here is something additional about what is considered balanced/triggers the balancer, emphasis added.

https://www.mongodb.com/docs/manual/core/sharding-balancer-administration/#migration-thresholds

Migration Thresholds

To minimize the impact of balancing on the cluster, the balancer only begins balancing after the distribution of data for a sharded collection has reached certain thresholds.

A collection is considered balanced if the difference in data between shards (for that collection) is less than three times the configured range size for the collection. For the default range size of 128MB, two shards must have a data size difference for a given collection of at least 384MB for a migration to occur.

1 Like