Real CF Load Balancer on lb.christoroberts.com with health monitors and automatic failover
Hit the LB and see which origin responds:
for i in $(seq 1 10); do curl -s https://lb.christoroberts.com/?t=$RANDOM | grep -o 'Origin [0-9]' | head -1; sleep 0.3; done
Test failover (take Origin 1 offline, then hit LB):
curl -s https://lb-origin-1.laboratory.workers.dev/toggle # take Origin 1 offline sleep 20 # wait for health check (15s interval) for i in $(seq 1 5); do curl -s https://lb.christoroberts.com/?t=$RANDOM | grep -o 'Origin [0-9]' | head -1; done curl -s https://lb-origin-1.laboratory.workers.dev/toggle # bring it back
Health checks run every 15 seconds. After toggling, wait ~20s for the LB to detect the change.
Check pool health status:
curl -s https://lb-demo.laboratory.workers.dev/status | python3 -m json.tool