metric { roundrobin | weight-roundrobin | least-connection | weight-least-connection | source-ip-hash | weight-source-ip-hash }
| Parameter | Description | Value |
|---|---|---|
| roundrobin | Indicates the round robin algorithm. |
- |
| weight-roundrobin | Indicates the weighted round robin algorithm. |
- |
| least-connection | Indicates the least connections algorithm. |
- |
| weight-least-connection | Indicates the weighted least connections algorithm. |
- |
| source-ip-hash | Indicates the source ip hash algorithm. |
- |
| weight-source-ip-hash | Indicates the weighted source ip hash algorithm. |
- |
The default algorithm is round robin (roundrobin). One real server group can use only one load balancing algorithm.
If real servers have different performance, use a weighted load balancing algorithm (weight-roundrobin, weight-least-connection, or weight-source-ip-hash) and set weights for each real server.