Zero-Downtime Deploys With a Two-Line Health Check

2026-07-23

Most "zero-downtime deploy" writeups jump straight to blue-green clusters and service meshes. Most teams don't need that. What they need is for the load balancer to stop sending traffic to a process that isn't ready yet.

The setup

until curl -sf http://localhost:8000/healthz; do sleep 1; done
echo "new instance is ready, swapping traffic"

That's it. No orchestration platform required — just don't route to a process before it says it's ready, and don't kill the old one before the new one is.

Where this breaks down

Long-running requests in flight during the swap, and background workers that don't have a health check at all. Both are solvable, but they're a different post.