Shard balance is by default is confusing, can someone pls explain?

I think that the main issue here is that the documentation is not helpful in this case, it just show the defaults but does not explain how they are used, so it is indeed cryptic for end users.

This post here in the forum gives a better explanation: How to correctly determine the weight of a node - #3 by Paul_Le_Tilly

It was required to look into the code to know how the weight values are used in the calculation.

And according to the linked post, this is the formula:

Weight = ShardsLoad * cluster.routing.allocation.balance.shard / SumSettings + IndexLoad * cluster.routing.allocation.balance.index / SumSettings + WriteLoad * cluster.routing.allocation.balance.write_load / SumSettings + DiskLoad * cluster.routing.allocation.balance.disk_usage / SumSettings

1 Like