Does the chunk balancing take the SSD size into consideration?

I understood that the Balancer will rearrange chunks if one shard grows too big. It identifies the need by looking at the number of chunks per shard and decides accordingly

But what if 2 servers have different disk capacities?

What if S1 is 100 GB and the other server S2 is 200 GB? In this case, it’ll make more sense for it to have more chucks in S2 than in S1

Hi @Shrinidhi_Rao and welcome to the MongoDB community!!

The chunk balancing between the shard servers depends on the number of chunks in each of the shard servers and is not dependent on the hardware of the machine. or the document or collection size of the chunks being migrated.

The MongoDB cluster balancer deals with redistribution of the shards evenly among the other shards of the sharded collection.
The balancer migrates the chunks from shards with higher number of chunks to shards with lower number of chunks till there is an even distribution of chunks between shard servers.

Please refer to the documentation of Sharded Cluster Balancer for further understanding.

Let us know if you have any further questions.

Best Regards



This means I need to make sure everyone is on same hardware specs :smile:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.