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

Caddy holds the public port

Caddy listens on :8080. The route has an @id so the playbook can patch the upstream without rewriting the whole config.

One route, one upstream

Before the switch, dial points at 127.0.0.1:18080. After the switch, the same route points at 127.0.0.1:18081. Readers do not change URL.

Slot playground · caddy-switch
readerCaddy :8080blue :18080 · upgreen :18081 · up
Caddy points at blue on :18080.
  1. Caddy points at blue on :18080.
  2. The same route now points at green on :18081.
diff · caddy
"dial": "127.0.0.1:18080"
"dial": "127.0.0.1:18081"

The route must already exist before the first deploy. The playbook patches that route; it does not invent it quietly.

Reader notes

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