Updated on 2024-02-29 GMT+08:00

Switching the Load Balancing Algorithm

If you configure one or more origin server addresses, you can use a load balancing algorithm to distribute traffic across these origin servers. WAF supports the following algorithms:

  • Origin server IP hash: Requests from the same IP address are routed to the same backend server.
  • Weighted round robin: All requests are distributed across origin servers in turn based on weights set to each origin server. The origin server with a larger weight receives more requests than others.
  • Session hash: Requests with the same session tag are routed to the same origin server. To enable this algorithm, configure traffic identifiers for known attack sources, or Session hash algorithm cannot take effect.

Prerequisites

The website you want to protect has been added to WAF.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. Click in the upper left corner and choose Security > Web Application Firewall.
  4. In the navigation pane, choose Website Settings.
  5. In the Domain Name column, click the domain name of the website to go to the basic information page.
  6. In the Load Balancing Algorithm field, click . In the dialog box displayed, select a load balancing algorithm and click Confirm.