This is with version 17.03.
We have containers that take 30 seconds to startup and start responding to health checks (spring boot application).
In order for giving the container enough time to start, I had to give it a sufficient amount of number for retries and interval, which means that if the service becomes unhealthy, it will take at least 30 seconds where swarm will be routing traffic to a broken service, before taking it out of rotation. (which is unacceptable, our current static prod environment has a 2x3 second healthcheck which will give us 6 seconds of downtime).
I could not find anything on the documentation and the community that will point to a way to work this issue.
I want to know if I missed anything, or this will be a planned feature in the future, or should I start working on a PR.
I also created https://github.com/docker/swarm/issues/2708