I am currently testing Docker’s newly integrated swarm feature with 1 manager node and two workers. On my two worker nodes I have deployed a simple service with a webapp (replicas=2) which prints the hostname of the container. I also published the port on the host in order to use the routing mesh. So far so good. Now I am testing the rolling update feature and for that I simply run the “docker service update” command on my service. During the service update I am running a curl on each worker node every second on the URL of that webapp which displays the hostname of the container it us running on. Thanks to that test I have noticed that during approximately 1-2 seconds there is no connection possible anymore on both worker nodes at the same time as you can see below the output of my two curls:
curl: (7) Failed to connect to 192.168.1.86 port 10016: Connection refused
curl: (7) Failed to connect to 192.168.1.87 port 10016: Connection refused
It seems like during the rolling update it shuts down the listen port on all worker nodes at the same time, which for me does not make any sense. Is this a normal behavior? any ideas how I can avoid that?
The point for me of having rolling updates is that there is no interruption of service, not even 1 second in the case where I have at least two replicas of the same web app running on two different worker nodes.