I have a service running Tomcat containers. I defined a health check on it - the health check succeed once the application is fully started. Rancher UI shows the container in Initializing state until the health check passes. The service is running with a scale of 2 containers.
The scenario is let’s say I destroy one of the 2 container, Rancher correctly starts a new one. The new container starts and goes into Initializing state until the health check passes.
However, it looks like the Load Balancer start sending requests to it before it’s fully up - i.e. the balancer does not seem to wait for the health check to succeed before using the new container as a target.
That’s not too good for 0-downtime deployment. Is that the expected behavior or am I missing something?