Zero-downtime delivery · 7 / 10 ·
The health check is the gate
The health check is the reason this whole architecture is safe. The idle slot must answer GET /health before Caddy moves. If the check fails, the playbook stops — the live slot is untouched, and readers never find out a deploy was attempted and failed.
- The health check runs on the idle slot.
- The check fails. The switch stays closed. Blue stays live.
- The check passes. Only now may the switch move.
Change the explainer to health: fail. Watch blue keep receiving requests. That is why this gate exists.
Quick recap
- A failed gate means the deploy stops; traffic stays safe on the old version.
- A health endpoint must prove the app is ready to work, not merely alive.
- The wait budget (retries × delay) is a deliberate choice — not an unexamined default.