Zero-downtime delivery · 1 / 10 ·
Why a restart is downtime
The titikterang app answers on one port. When you run docker compose down and then up, there is a stretch with no process listening. Requests in that second fail. That is downtime, even if it lasts only a few seconds.
The stop-start gap
The sequence is always the same: stop the old process, pull the new image, start the new process, wait until it is healthy. Traffic does not wait politely. A proxy that still points at an empty port returns an error.
- The container is up and requests pass.
- The container is stopped. Requests fall into the gap.
- A new container is starting. Traffic is still empty.
- The container is healthy again. Readers already felt the pause.
What to keep
Zero downtime does not mean no work. It means the work happens where readers cannot see it. The next chapter adds a second slot so the gap moves to the idle side.
Lab files live in examples/titikterang.