Zero-downtime delivery · 5 / 10 ·
Caddy holds the public port
So far there are two slots but no front door. Caddy is that door: a reverse proxy listening on :8080 that forwards traffic to one of the slots. Readers never know — and never need to know — which slot is currently active.
The route in Caddy carries 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. The reader's URL never changes.
- Caddy points at blue on :18080.
- The same route now points at green on :18081.
Quick recap
- Caddy is the only thing facing the public; slots stay hidden on loopback.
- The
@idlets the upstream be patched surgically — not rewritten from scratch. - The route must be seeded before the first deploy; the playbook patches, it does not create.
- The switch is a single PATCH — no proxy restart, no gap.