All services / Performance / Load Balancing
⚖️
Performance

Load Balancing

Keep the app online and fast by spreading traffic across origins with health checkshealth checkAn automatic test of whether a server is up and responding; unhealthy servers are taken out of rotation. and automatic, geo-aware failoverfailoverAutomatically switching to a backup server when the primary one fails..

What it is

Cloudflare Load Balancingload balancingSpreading incoming traffic across multiple servers so no single one gets overwhelmed. distributes traffic across multiple origins and data centers, runs active health checkshealth checkAn automatic test of whether a server is up and responding; unhealthy servers are taken out of rotation., and automatically fails traffic away from unhealthy origins. Geo-steeringgeo-steeringRouting each user to the closest or best-performing server based on their location. sends each user to the closest healthy pool — all from Cloudflare's global network rather than a single region.

Why it helps the client

  • High availability — automatic failover keeps the app up when an origin or region fails.
  • Better performance — geo-steering routes users to the nearest healthy origin.
  • Zero-downtime operations — drain or add origins for maintenance and blue/green deploys.
  • Edge-native — health checks and steering run across Cloudflare, not one data center.

Why they'd want it

  • Resilience without buying hardware load balancers or hacking DNS.
  • Confidence during traffic spikes and origin outages.
  • Global traffic steering that a simple DNS record can never provide.

🔬 How it actually works

  • Load Balancingload balancingSpreading incoming traffic across multiple servers so no single one gets overwhelmed. runs at the edgethe edge“The edge” means Cloudflare's servers spread across the world, close to your users — as opposed to one central data center. across the whole network rather than in one region, so health checkshealth checkAn automatic test of whether a server is up and responding; unhealthy servers are taken out of rotation. and steering decisions happen close to users. Origins are grouped into pools that sit behind a load balancer hostname.
  • Health monitors probe each originoriginYour own web server or host where your website actually lives. Cloudflare sits in front of it. from multiple Cloudflare locations on an interval; an origin that fails the threshold is pulled from rotation automatically and restored when it recovers.
  • Steering modes include off (priority/failoverfailoverAutomatically switching to a backup server when the primary one fails.), random (weighted), geo-steeringgeo-steeringRouting each user to the closest or best-performing server based on their location. (by region), dynamic (lowest latencylatencyThe delay before data starts transferring — essentially how long a user waits. Lower is better.), and proximity — so you optimize for availability or performance.
  • It fronts any HTTP/TCP/UDP originoriginYour own web server or host where your website actually lives. Cloudflare sits in front of it. on-prem or in any cloud, making it ideal for hybrid and multi-cloud, plus zero-downtime maintenance drains and blue/green deploys without DNSDNSDomain Name System — the Internet's phone book, translating a domain name (example.com) into a server address. TTLTTLTime To Live — how long cached content is kept before it's refreshed. games.

📖 Key terms on this page hover any underlined term anywhere on the site for its definition

health check
An automatic test of whether a server is up and responding; unhealthy servers are taken out of rotation.
failover
Automatically switching to a backup server when the primary one fails.
load balancing
Spreading incoming traffic across multiple servers so no single one gets overwhelmed.
geo-steering
Routing each user to the closest or best-performing server based on their location.
origin
Your own web server or host where your website actually lives. Cloudflare sits in front of it.
DNS
Domain Name System — the Internet's phone book, translating a domain name (example.com) into a server address.
the edge
“The edge” means Cloudflare's servers spread across the world, close to your users — as opposed to one central data center.
latency
The delay before data starts transferring — essentially how long a user waits. Lower is better.
TTL
Time To Live — how long cached content is kept before it's refreshed.
IP address
A numeric address that identifies a device or server on the Internet.

Live demo walkthrough

5 steps

Screens below are annotated recreations of the Cloudflare dashboard. The numbered orange pin marks exactly where to click.

1

Select the website

👆 Account Home → example.com
🔒dash.cloudflare.com
example.com
Test Account NickN

👉 Do this

Open the site whose origins you want to balance.

💬 Say this

“Let's set up resilient traffic distribution for our demo app.”

2

Open Traffic → Load Balancing

👆 Left nav → Traffic → Load Balancing
🔒dash.cloudflare.com/example.com/traffic/load-balancing
example.com
Test Account NickN

Traffic

Load Balancing

Load Balancers
NameHostnamePoolsHealth
prod-lbwww.example.com3 originsHealthy
api-lbapi.example.com4 originsHealthy
Pool health
us-east (2/2 healthy)   eu-west (2/2 healthy)   ap-south (1/2 healthy)
Traffic steeringHow Cloudflare chooses a pool for each request.
Geo-steering
Session affinityPin a visitor to the same origin for their session.
Health check intervalHow often each origin is probed from Cloudflare's network.
Every 15s

👉 Do this

Expand Traffic and click Load Balancing.

💬 Say this

“This is the Load Balancing manager. Each load balancer sits in front of pools of origins spread across regions.”

3

Create a Load Balancer

👆 Load Balancing → Create Load Balancer
🔒dash.cloudflare.com/example.com/traffic/load-balancing
example.com
Test Account NickN

Traffic

Load Balancing

Load Balancers
NameHostnamePoolsHealth
prod-lbwww.example.com3 originsHealthy
api-lbapi.example.com4 originsHealthy
Pool health
us-east (2/2 healthy)   eu-west (2/2 healthy)   ap-south (1/2 healthy)
Traffic steeringHow Cloudflare chooses a pool for each request.
Geo-steering
Session affinityPin a visitor to the same origin for their session.
Health check intervalHow often each origin is probed from Cloudflare's network.
Every 15s

👉 Do this

Click 'Create Load Balancer', then add origin pools by region and define a health check.

💬 Say this

“We create a load balancer, add origin pools by region, and set a health check. Cloudflare then probes every origin continuously from around the world.”

4

Show health & failover

👆 Load Balancing → Pool health
🔒dash.cloudflare.com/example.com/traffic/load-balancing
example.com
Test Account NickN

Traffic

Load Balancing

Load Balancers
NameHostnamePoolsHealth
prod-lbwww.example.com3 originsHealthy
api-lbapi.example.com4 originsHealthy
Pool health
us-east (2/2 healthy)   eu-west (2/2 healthy)   ap-south (1/2 healthy)
4
Traffic steeringHow Cloudflare chooses a pool for each request.
Geo-steering
Session affinityPin a visitor to the same origin for their session.
Health check intervalHow often each origin is probed from Cloudflare's network.
Every 15s

👉 Do this

Point to the pool health panel showing a degraded region.

💬 Say this

“Here each pool reports health. The moment ap-south degrades, Cloudflare instantly steers users to the next-closest healthy pool — your customers never see an error, and you never get paged at 2 a.m.”

5

Tune steering & health checks

👆 Load Balancing → Steering & monitors
🔒dash.cloudflare.com/example.com/traffic/load-balancing
example.com
Test Account NickN

Traffic

Load Balancing

Load Balancers
NameHostnamePoolsHealth
prod-lbwww.example.com3 originsHealthy
api-lbapi.example.com4 originsHealthy
Pool health
us-east (2/2 healthy)   eu-west (2/2 healthy)   ap-south (1/2 healthy)
Traffic steeringHow Cloudflare chooses a pool for each request.
Geo-steering
Session affinityPin a visitor to the same origin for their session.
Health check intervalHow often each origin is probed from Cloudflare's network.
Every 15s5

👉 Do this

Show the steering method, session affinity, and health-check interval.

💬 Say this

“You control the behavior: geo-steering for closest-origin routing, session affinity to keep a user pinned to one origin, and health checks probing every 15 seconds from our whole network — not one region guessing. This is a real global load balancer without a single box to rack.”

Questions clients ask

Tap a question to reveal the answer to say
How is this better than round-robin DNS?
DNSDNSDomain Name System — the Internet's phone book, translating a domain name (example.com) into a server address. round-robin can't tell a dead originoriginYour own web server or host where your website actually lives. Cloudflare sits in front of it. from a live one — it keeps sending users to failed servers until caches expire. Cloudflare actively health-checks and instantly steers away from unhealthy origins, and can route by geography or latencylatencyThe delay before data starts transferring — essentially how long a user waits. Lower is better., which DNS simply can't.
Can pools span multiple clouds and on-prem?
Yes — a pool can mix AWS, GCP, Azure, and on-prem origins. That's a common resilience play and a useful cloud-cost negotiating lever.
How fast is failover?
As fast as your health-check interval and threshold — seconds. Users are re-steered at the edgethe edge“The edge” means Cloudflare's servers spread across the world, close to your users — as opposed to one central data center. without waiting for DNSDNSDomain Name System — the Internet's phone book, translating a domain name (example.com) into a server address. caches to expire.
Does it add latency?
No meaningful latencylatencyThe delay before data starts transferring — essentially how long a user waits. Lower is better. — steering happens at the edgethe edge“The edge” means Cloudflare's servers spread across the world, close to your users — as opposed to one central data center. the user already reaches, and geo/dynamic steering usually reduces latency.
What about sticky sessions?
Session affinity is supported by cookie or IPIP addressA numeric address that identifies a device or server on the Internet., so a user stays pinned to the same originoriginYour own web server or host where your website actually lives. Cloudflare sits in front of it. when your app needs it.