Load Balancing Pools, Health Monitors, Traffic Steering and Failover
How load balancers use pools, monitors, steering policies, and failover to route traffic only to healthy endpoints.
This page summarizes Cloudflare Load Balancing documentation: how requests move through a load balancer to pools and endpoints, how monitors decide what is healthy, and how traffic steering and failover behave in practice.
Normally, requests to your application would go to individual servers directly. With a load balancer, requests first go through the load balancer. Your load balancer then routes requests to specific pools.
— Cloudflare, Components of a load balancer
Within each pool, traffic goes to individual endpoints—the origins that actually answer the request. Health decisions and steering policies sit on top of that load balancer → pool → endpoint path.
Pools, endpoints, and monitors: what each layer does
Section titled “Pools, endpoints, and monitors: what each layer does”A pool groups endpoints (IP addresses or hostnames) that can serve the same role. A pool may hold many endpoints or a single origin; think of it as a healthy-only record set.
Within Cloudflare, pools represent your endpoints and how they are organized. As such, a pool can be a group of several endpoints, or you could also have only one endpoint per pool — it depends on what best suits your use case.
— Cloudflare, Pools
A monitor (health monitor) probes endpoints on an interval and marks them pass or fail. Monitors attached to load balancer pools are not the same product as standalone Health Checks, which probe origins without distributing traffic.
Cloudflare Health Checks are identical to monitors within a load balancer, but only meant for probing server health (and not distributing traffic).
— Cloudflare, Load balancing FAQ
Each probe tries to answer whether the endpoint is reachable within Timeout, and whether it behaves as expected (status codes, optional body substring in the first 10 KB). See How endpoints and pools become unhealthy for the full decision tree.
Endpoint health quorum and pool status
Section titled “Endpoint health quorum and pool status”For each Health Monitor Region on a pool, Cloudflare sends checks from three data centers in that region. A region is healthy when a majority of those data centers pass; the endpoint is healthy when a majority of configured regions pass.
| Pool dashboard status | Meaning |
|---|---|
| Healthy | All endpoints healthy |
| Degraded | At least one unhealthy endpoint, but the pool still meets its Health Threshold and can receive traffic |
| Critical | Available healthy endpoints fell below Health Threshold; the pool is excluded from steering (except as Fallback Pool) |
| Health unknown | No monitor yet, or no result from the first checks |
| No health | Reserved for the load balancer fallback pool |
When a pool reaches Critical health, your load balancer will begin diverting traffic according to its Traffic steering policy.
— Cloudflare, How endpoints and pools become unhealthy
Traffic steering: how the load balancer picks a pool
Section titled “Traffic steering: how the load balancer picks a pool”Traffic steering is the load balancer’s policy for choosing among attached, healthy pools. Global traffic steering policies include Standard (Off–Failover, Random), Geo, Dynamic, Proximity, and Least Outstanding Requests (LORS). Enterprise plans (or add-ons) unlock several of these; Standard options are documented under Standard steering policies.
When requests come to your load balancer, it distributes them across your pools and endpoints according to four factors: Pool and endpoint health … Pool sets … Global traffic steering … Local traffic steering.
— Cloudflare, Traffic steering
Off–Failover (active–passive) vs Random (active–active)
Section titled “Off–Failover (active–passive) vs Random (active–active)”Off–Failover uses pool order as priority. Traffic stays on the first healthy pool until it fails the Health Threshold, then moves to the next pool—typical active–passive setups.
An active-passive failover sends traffic to the endpoints in your active pool until a failure threshold (configurable) is reached. At the point of failure, your load balancer then redirects traffic to the passive pool.
— Cloudflare, Common configurations
With Traffic Steering: Off, only the primary pool receives traffic until it is unhealthy; when the primary recovers, traffic failback returns to it unless session affinity keeps users on the standby pool.
Random spreads traffic across healthy pools by weight—common for active–active. Weights use the same idea as endpoint weights: probability = weight ÷ sum of weights (see Endpoint steering policies).
Dynamic, Geo, Proximity, and LORS at a glance
Section titled “Dynamic, Geo, Proximity, and LORS at a glance”| Policy | Chooses pools by |
|---|---|
| Dynamic steering | Lowest RTT (EWMA from health probes); allow ~10 minutes on first enable |
| Geo steering | Region, country, or (Enterprise API) PoP mapping |
| Proximity steering | GPS coordinates on pools vs client location |
| Least Outstanding Requests | Pool weights adjusted by in-flight HTTP requests (meaningful on proxied L7 only) |
Pool sets: location-specific routing on the API
Section titled “Pool sets: location-specific routing on the API”Pool sets replace simple Geo steering for advanced cases: first matching set wins, and each set can define its own pools, weights, steering_policy, and fallback pool. Unmatched requests fall through to default_pools and global steering fields.
Pool sets are stored as an ordered array on the load balancer. Cloudflare evaluates them in array order and stops at the first pool set whose match succeeds.
— Cloudflare, Pool sets
Use Geo steering in the dashboard for simple geographic failover; pool sets when you need per-location Dynamic Latency, weighted random, or custom fallbacks.
Endpoint steering: how a pool picks a server
Section titled “Endpoint steering: how a pool picks a server”Endpoint steering applies inside one pool: Random, Hash, or Least Outstanding Requests, combined with per-endpoint weights (0–1).
% of traffic to endpoint = endpoint weight ÷ sum of all weights in the pool
— Cloudflare, Endpoint steering policies
Hash steering pins a client IP to an endpoint but may diverge from nominal weights; session affinity overrides weights and steering for subsequent requests. With a Worker in front of the load balancer, set x-forwarded-for from CF-Connecting-IP so Hash steering stays consistent (Hash steering).
LORS and least-outstanding behavior on DNS-only load balancers treats outstanding counts as zero—steering reduces to weights only (Least Outstanding Requests pools).
Fallback pools, adaptive routing, and zero-downtime failover
Section titled “Fallback pools, adaptive routing, and zero-downtime failover”The fallback pool is the last resort when every default pool is unhealthy or disabled. Its health is not evaluated; status shows as No health.
This pool is meant to be the pool of last resort, meaning that its health is not taken into account when directing traffic.
— Cloudflare, How endpoints and pools become unhealthy
Adaptive routing covers zero-downtime failover and failover across pools during gaps between active health checks.
Zero-downtime failover will trigger a single retry only if there is another healthy endpoint in the pool and a 521, 522, 523, 525 or 526 error code is occurring. No other error codes will trigger a zero-downtime failover operation.
— Cloudflare, Adaptive routing
Modes include None, Temporary (retry another endpoint until recovery), and Sticky (update session affinity cookie—not with HTTP-header session affinity). See Session affinity.
Regional health: when one global “healthy” flag is wrong
Section titled “Regional health: when one global “healthy” flag is wrong”By default, all monitor regions collapse into one global pool health decision everywhere. Regional health adds per-region decisions with global fallback via health_sources: ["regional", "global"].
Use it when reachability differs by region (for example, a US pool reachable from North America but not from Europe during a peering issue). Narrowing check_regions alone cannot make two regions disagree—only health_sources with regional can.
Load shedding, maintenance, and custom rules
Section titled “Load shedding, maintenance, and custom rules”Load shedding on a pool diverts traffic before failover triggers—start with a small Shed % and choose Random vs IP Hash for default traffic (Load shedding). If every pool sheds, some traffic hits the fallback pool; keep at least one pool without shedding.
For planned work, endpoint drain (proxied L7, session affinity required) lets sessions expire before you disable an endpoint (Perform planned maintenance). Disabling an endpoint stops new connections but does not forcibly close existing ones—including long-lived WebSockets.
Load Balancing rules can return fixed HTTP responses or override steering, pools, session affinity, and TTL for matched requests—useful alongside DNS persistence patterns for DNS-only split setups.