API Doc
Search Docs...
⌘ K
ACOSABSAVEANSABDRAKEObservability

Forwarding policy

A forwarding policy is a traffic orchestration capability for workload ingress in L7 load balancing. A forwarding policy usually corresponds to one or more access domain names and defines the request ingress scope. Forwarding rules further define request matching conditions and post-match actions within the policy.

Through forwarding policies and forwarding rules, L7 load balancing can combine domain names, paths, HTTP methods, source IP addresses, backend server pools, and session persistence to achieve fine-grained Layer 7 traffic governance.

Domain-based policy matching

A forwarding policy uses domain names as the ingress dimension and supports exact domain names, wildcard domain names, and combinations of multiple domain names. Domain names across different forwarding policies must be unique so that the same request ingress is not handled by multiple policies simultaneously.

Fine-grained rule-based matching

Forwarding rules match requests by URL path, HTTP method, and source IP address. A path can be used for ordinary prefix matching or configured as a wildcard-capable path rule. Source IP matching relies on real client IP information, such as X-Forwarded-For.

Priority control

Multiple forwarding rules can be configured under the same forwarding policy. Rules are matched in priority order, with higher-priority rules matched first. After a request matches the first rule whose conditions are met, the action corresponding to that rule is performed.

Forwarding to a specified backend server pool

A forwarding rule can forward requests to a specified backend server pool. L7 load balancing selects a specific backend server from the target server pool based on the load balancing algorithm, health check results, and session persistence policy. If a request does not match any forwarding rule, it is forwarded to the default server pool.

Integration with session persistence

A forwarding rule can be associated with session persistence settings, such as Cookie-based or source IP-based session persistence policies. This capability allows rule-level control over whether a specific workload path or access source must access the same backend server.

As shown below, after a client sends an HTTP request, L7 load balancing first matches the corresponding forwarding policy based on the Host in the request, and then matches forwarding rules under that policy according to conditions such as Path, Method, and Source IP. Rules are matched in priority order, with higher-priority rules matched first. Once a rule is matched, L7 load balancing forwards the request to the ServerPool specified by the rule and uses the server pool's load balancing algorithm, health check results, and session persistence policy to select a specific backend server to complete request forwarding. If the request does not match any rule, it is forwarded to the default server pool.