Load balancing
Guide
Load balancing & routing
Priority, weighted and performance routing across multiple backends with health checks.
A domain can forward to a single backend (via forward_ipv4/forward_addr) or spread traffic across many using a routing_rules. Routing decides which backend handles each request and how the pool reacts when one goes unhealthy.
Three routing methods
- Priority (default) — always use the highest-priority healthy backend; fail over to the next only when it goes down. Classic active/standby.
- Weighted — distribute requests across backends in proportion to their weight. Good for splitting load across unequal machines.
- Performance — prefer the backend responding fastest, adapting to real-time latency.
ℹ️Health checks
Enable
enable_health_checks so unhealthy backends are pulled from rotation automatically and returned when they recover. Tune the cadence with health_check_interval and the probe path with health_check_path.