Updated on 2024-04-17 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.


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


  • You have selected Cloud - CNAME for Protection when adding the website to WAF.
  • Only the professional and platinum editions support configuring load balancing algorithms.
  • Configuring load balancing algorithms is supported in some regions. For details, see Functions.


  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 Web Application Firewall under Security & Compliance.
  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.