apache / incubator-horaedb-meta

Meta service of HoraeDB cluster.

Home Page:https://horaedb.apache.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Balance the shard distribution on servers

MichaelLeeHZ opened this issue · comments

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:

  • The maximum count of shards on a single server is 8.
  • The minimum count of shards on a single server is 2.

Proposal

Make the distribution of shards more even.

Additional context