I am running docker stacks on a swarm cluster.
What I expect when I update service is the following sequence for each container needs updating.
- Route new traffic to other functioning containers, no new traffic will be routed to the stopping container.
- Waiting X seconds before sending signals to stop the container.
- Start a new container with the updated images.
- Wait for another Y seconds to make sure the new container is stable.
- Start routing new traffic to the updated (new) container.
The documents I found do not quite clear about how mesh routing and service lifecycle interacts.
My guess is that Y goes to:
deploy: update_config: monitor: Y
Is this correct?
Or the value there does not affect mesh routing in any way, only affecting the container lifecycle?
Also, I can’t seem to find where to specify X.
Could you tell me where?
Or if I am missing something, could you tell me how does mesh routing actually works in this situation? Or, where can I find the related info?