B. Blue Green a software delivery tutorial
Vol. I § Zero-downtime series § A series for junior developers
Zero-downtime delivery · 10 / 10 ·

Rollback moves the switch back

Rollback is not a rebuild. The old slot still holds v1.2.3. The playbook patches Caddy back to that port and writes state.json.

Slot playground · rollback
readerCaddy :8080blue :18080 · upgreen :18081 · up
Green is live, but the new version is wrong.
  1. Green is live, but the new version is wrong.
  2. Caddy returns to blue. The old version is still in state.json.

Drain mode shows old requests finishing before the old slot stops.

Slot playground · drain
readerCaddy :8080blue :18080 · upgreen :18081 · up
New traffic goes to green. Blue still finishes old requests.
  1. New traffic goes to green. Blue still finishes old requests.
  2. Old requests finished. Blue is stopped.

If a new release fails the health check, you never reach this step. The health gate already kept readers on the old version.

Reader notes

Chapter discussion appears once Giscus is connected to the site repository.