Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
It is possible that a cluster is unbalanced even if it is not breaking any of the policy rules. Some nodes may have very little load while some others may be heavily loaded. So, it is possible to move replicas around so that the load is more evenly distributed. This is going to be driven by preferences. The way we arrive at these suggestions is going to be as follows
- Sort the nodes according to the given preferences
- Choose a replica from the most loaded node (source-node)
- try adding them to the least loaded node (target-node)
- See if it breaks any policy rules. If yes , try another target-node (go to #3)
- If no policy rules are being broken, present this as a suggestion . The suggestion contains the following information
- The source-node and target-node names
- The actual v2 command that can be run to effect the operation
- Go to step #1
- Do this until the a replicas can be moved in such a way that the target node is more loaded than the source-node