Updating your application’s services
In this section, we are going to review how Docker Swarm will help our applications’ stability and availability when we push changes to them. It is important to understand that whatever platform we are using to run our containers, we need to be able to modify our application content to fix issues or add new functionality. In production, this will probably be more restricted but automation should be able to do this too, ensuring a secure supply chain.
Docker Swarm provides a rolling update feature that deploys new changes without interrupting current replicas and automatically switches to an older configuration when the update goes wrong (rolls back).
You as a developer must think about which update method fits your application best. Remember to deploy multiple replicas if you want to avoid any outages. This way, by setting the update parallelism (--update-parallelism
), the delay in seconds between container updates (--update...