demo: load balancing → origin failover
a cloudflare load balancer sits in front of two workers (origin-a and origin-b). the LB has a health monitor, a default pool (pool-a), and a fallback pool (pool-b). when the primary pool's origin is healthy, all traffic flows to pool-a. disable origin-a in the dashboard, wait for the health monitor to mark it unhealthy, and traffic automatically fails over to pool-b.
click to fetch…
# how to trigger failover
- dashboard → traffic → load balancing → pools
- edit
SITE_lb_pool_a - toggle
origin-ato disabled (or edit its address to break it) - save. within ~1 minute the health monitor marks pool_a unhealthy
- refresh this page's fetch button — responses now come from origin-b (pool_b, the fallback)
- toggle origin-a back on to restore normal routing
# config
| load balancer | lb-demo.rhocfsandbox.com |
| default pool | SITE_lb_pool_a |
| fallback pool | SITE_lb_pool_b |
| health monitor | SITE_lb_monitor · HTTPS GET / · expect 200 · 60s interval |
| steering policy | geo (region_pools with WNAM/ENAM→A, everything else→B) |
| origins | 2× cloudflare workers on workers.dev, each returns json identifying itself |