Load balancers configuration
The [loadbalancers.<name>] section defines load balancers that distribute incoming traffic across multiple backend servers. Load balancers can be referenced in location targets using the syntax http://${loadbalancer_name}:port.
Parameters
Section titled “Parameters”- Type:
String - Required: No
- Default:
round_robin - Description: The load balancing algorithm to use. Supported values are
round_robinfor even distribution across all backends, andip_hashfor session persistence by routing the same client IP to the same backend.
backends
Section titled “backends”- Type:
Array<String> - Required: Yes
- Description: List of backend server IP addresses or hostnames.
weights
Section titled “weights”- Type:
Array<Integer> - Required: No
- Description: List of weights for weighted round robin load balancing. Only applicable when
algoisround_robin. The number of weights must match the number of backends. Higher weights receive proportionally more traffic.