If multiple origin servers are specified for a website that is added to the WAF console for protection, WAF automatically performs health check on each origin server and distributes back-to-origin requests to the IP address of each origin server. This achieves load balancing. You can specify a load balancing algorithm when you configure WAF.
- Log on to the Web Application Firewall console.
- In the top navigation bar, select the resource group to which the instance belongs and the region, Mainland China or International, in which the instance is deployed.
- In the left-side navigation pane, choose .
- On the Website Access page, find the target domain name and click Edit in the Actions column.
- On the Edit page, select the required load balancing algorithm in the Load Balancing Algorithm section.
- IP hash: Requests from a specific IP address are redirected to the same origin server. This
is the default value.
Note If the IP addresses of origin servers are not scattered after this algorithm is selected, imbalanced loads may occur.
- Round Robin: All requests are distributed to origin servers in turn.
- Least time: You can use the intelligent DNS resolution feature and the upgraded Least-time back-to-origin
algorithm to achieve the lowest latency when traffic is forwarded to origin servers.
Note You can select Least time only when intelligent load balancing is enabled. For more information, see Intelligent load balancing.
- IP hash: Requests from a specific IP address are redirected to the same origin server. This is the default value.
- Click Confirm.