Containers: Docker, Compose and Swarm

Expert

Every release drops requests

The shop runs on Docker Swarm, with two replicas of the API, and still every release breaks the checkout for a minute or so. Today the CI ships 1.5.0, which takes about 25 seconds to start, then 1.5.1 later on. Make releases invisible to customers: not a single failed request while the new version rolls out.

Your terminal is on manager-1, which is drained: the tasks run on worker-1 and worker-2. The CI only runs docker service update --image ... shop_api: whatever else the service needs must already be in its definition. The test calls http://<cluster>/products every minute for two hours, and every 2 seconds for four minutes from each release: 1.5.0 at 0:30, 1.5.1 at 1:15.

What your server must hold

  • probes.rollout ≥ 100
  • stack.outdatedTasks = 0
  • Availability ≥ 99 %

What you will master