apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.
https://horaedb.apache.org
Apache License 2.0
27 stars 15 forks source link

Balance the shard distribution on servers #200

Closed MichaelLeeHZ closed 1 year ago

MichaelLeeHZ commented 1 year ago

Description

Now the distribution of shard between servers may be not even, which cause high load on some server while low load on others. For example in my cluster, there are 128 shards and 30 servers, the shard count in every server like this:

4 
2 
8 
3 
7 
7 
3 
7 
2 
6 
3 
6 
4 
4 
7 
7 
3 
2 
3 
3 
5 
4 
2 
4 
3 
3 
4 
2 
6 
4 

We can observe the following:

Proposal

Make the distribution of shards more even.

Additional context