With Layer 7 HTTP virtual servers, you can optionally configure load balancer rules and customize load balancing behavior using match or action rules.

Load balancer rules are supported for only Layer 7 virtual servers with an HTTP application profile. Different load balancer services can use load balancer rules.

Each load balancer rule consists of single or multiple match conditions and single or multiple actions. If the match conditions are not specified, then the load balancer rule always matches and is used to define default rules. If more than one match condition is specified, then the matching strategy determines if all conditions must match or any one condition must match for the load balancer rule to be considered a match.

Each load balancer rule is implemented at a specific phase of the load balancing processing; Transport, HTTP Access, Request Rewrite, Request Forwarding, and Response Rewrite. Not all the match conditions and actions are applicable to each phase.

Up to 4,000 load balancer rules can be configured with the API, if the skip_scale_validation flag in LbService is set. Note that the flag can be set via API. Refer to the NSX-T Data Center API Guide for more information. Up to 512 load balancer rules can be configured through the user interface.

Load Balancer rules support REGEX for match types. For more information, see Regular Expressions in Load Balancer Rules.

Prerequisites

Verify a Layer 7 HTTP virtual server is available. See Add Layer 7 HTTP Virtual Servers.