Choose appropriate forwarding method
When configuring forwarding policies, Anti-DDoS Pro supports multiple flexible forwarding methods to meet the needs of different business scenarios.
The selection of forwarding method is applicable to the situation where there are multiple servers in the backend, and different policies are used for load balancing.
Forwarding rule type
- Non-web service rules support: Round robin, weighted round robin, origin IP hash
- Web service rules support: Round robin, weighted round robin, origin IP hash
Explanation of forwarding method
-
Round-robin
- Definition: Requests will be sent to the backend server in order.
- It treats each server in the backend in a balanced manner, regardless of the actual number of connections to the server and the current system load.
-
Weighted Round Robin
- Definition: Requests will be assigned to the backend servers according to the weight ratio configured by the origin server. Servers with higher weights are polled more often.
- Because different backend servers may have different machine configurations and current system loads, their stress tolerances are also different. A higher weight is assigned to a server with high configuration standards and low load, so that it can process more requests; a lower weight is assigned to a server with low configuration standards and high load to reduce its system load.
-
Origin IP hash
- Definition: When the backend server is unchanged, same requests will be mapped to the same backend server every time.
- The origin IP hash algorithm calculates a value by the hash function based on obtaining the IP address of the client. The value is then used to modulo the size of the server list, and the result is the serial number of the server that the client wants to access.