Docker Community Forums

Share and learn in the Docker community.

Docker service update: start everything before redirecting requests to updated services

When updating services / redeploying, I want to be able to start all the updated replicas and then start to accepting requests, while no requests are redirected to the outdated replicas (that should be shutting down by now).

I’m aware of “start-first” order, but even if I set the parallelism of the update config to the number of replicas, for a brief moment, some requests will reach the new containers and others will reach the old containers that were not shut down yet.

If I use “stop-first” and set parallelism the same as the number of replicas, I won’t get zero downtime deployment.

Is there any way to achieve that, while maintaining zero downtime deployments?