Advanced
Killed in the middle of a payout
The payout worker sends the sellers' money to the bank in batches. On every deployment, docker compose waits ten seconds, then kills it: some transfers are sent twice, others never, and finance reconciles by hand. The worker already knows how to stop cleanly when it receives SIGTERM. Make every deployment let it finish its batch.
A batch takes up to 25 seconds. The test runs docker compose up -d --build, then redeploys the worker every hour for five hours and checks how each copy of the worker ended. The shop's API must keep answering on port 80 meanwhile.
What your server must hold
- containers.ungracefulStops = 0
- Availability ≥ 99 %