Skip to content
Load Balancing
Visit Load Balancing on GitHub
Set theme to dark (⇧+D)

Load Balancing rules - BETA

Use Load Balancing rules to customize the behavior of your Cloudflare load balancer. For example, create a Load Balancing rule that selects an origin pool based on the URI path of an HTTP request.

You can create Load Balancing rules, using the Create Custom Rule dialog, whenever you create or edit a load balancer in the Traffic app:

Create Custom Rule card in Traffic app

As with Cloudflare Firewall rules, each Load Balancing rule is a combination of two elements: an expression and an action. Expressions define the criteria for an HTTP request to trigger an action. The action tells Cloudflare how to handle the request.

When building expressions for Load Balancing rules, refer to Supported fields and operators for definitions and usage.