The lecture notes on “Balancing”, states that:
“The balancer can migrate chunks in parallel.
A given shard cannot participate in more than one migration at a time.”
So it seems that the number of balancer round is depending on number of chunks in each shard.
But the next sentence the lecture nodes states the following:
“So take the floor of n divided by 2, where n is the number of shards, and you have the number of chunks that can be migrated in a balancer round.”
So, for example is I have 6 shards, the blanacer can migrate only 3 chunks.
The first couple of statements seem to say that number balancer rounds would depend on number of chunks within a shard that need to migrate. But the later statement, make this based on the number of shards.
It seems to me that the formula to determine how many rounds of balancer, should depend on both:
- Number of chunks need to migrate.
- Number of shards that these chunks can move to.
Can you elaborate on that?