rhocfsandbox.com

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

  1. dashboard → traffic → load balancing → pools
  2. edit SITE_lb_pool_a
  3. toggle origin-a to disabled (or edit its address to break it)
  4. save. within ~1 minute the health monitor marks pool_a unhealthy
  5. refresh this page's fetch button — responses now come from origin-b (pool_b, the fallback)
  6. toggle origin-a back on to restore normal routing

# config

load balancerlb-demo.rhocfsandbox.com
default poolSITE_lb_pool_a
fallback poolSITE_lb_pool_b
health monitorSITE_lb_monitor · HTTPS GET / · expect 200 · 60s interval
steering policygeo (region_pools with WNAM/ENAM→A, everything else→B)
origins2× cloudflare workers on workers.dev, each returns json identifying itself