If you have chosen the Weighted Min-load (loadbalance.type=2) algorithm for load balancing, you will have to configure a performance weight for each clustered server in the cluster. The higher performance weight you set to a clustered server, the higher chance it may get selected by the server that has the active scheduler during load balancing.
To configure performance weight:
The following are two examples for how Least Weighted Current Reports algorithm works:
Example 1 - when there are free servers:
| Active Servers | ServerA | ServerB | ServerC | Comments |
|---|---|---|---|---|
| Is local server | TRUE | FALSE | FALSE | |
| Maximum concurrent reports | 8 | Unlimited | 5 | |
| Number of currently running reports | 6 | 6 | 5 | |
| Performance weight | 10 | 10 | 10 | |
| Calculation | ||||
| Weighted current reports | 0.6 | 0.6 | 0.5 | |
| Is free | TRUE | TRUE | FALSE | Current < MaxConcurrent, or MaxConcurrent is unlimited |
| Candidate servers | YES | YES | Select from free servers | |
| Candidate servers | YES | YES | Select servers which have the least Weighted current reports | |
| Selected server | YES | Local server has higher priority | ||
Example 2 - when there are no free servers:
| Active Servers | ServerA | ServerB | ServerC | Comments |
|---|---|---|---|---|
| Is local server | TRUE | FALSE | FALSE | |
| Maximum concurrent reports | 10 | 10 | 10 | |
| Number of currently running reports | 10 | 10 | 10 | |
| Performance weight | 4 | 5 | 8 | |
| Calculation | ||||
| Weighted current reports | 2.5 | 2 | 1.25 | |
| Is free | FALSE | FALSE | FALSE | Current < MaxConcurrent, or MaxConcurrent is unlimited |
| Candidate servers | YES | YES | YES | Selects from all servers when all servers are full |
| Candidate servers | YES | Select servers which have the least Weighted current reports | ||
| Selected server | YES | Select ServerC | ||