New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
health check with higher rate during start_period #10461
Comments
This sounds like a nice improvement! Compose's health check support is actually a wrapper around the functionality in Docker Engine, so this would need to exist there before Compose can support it. I would open a feature request at https://github.com/moby/moby - if/when it's included in an Engine release, we can look at extending |
With |
Might as well re-open this one 👍 Next step would probably be a change in the compose-spec; there's a tracking issue in moby; And a pending PR in the compose-spec (which has to be included in compose once that's accepted/merged); |
Thanks @thaJeztah 👍 |
Description
When checking the health_check to create a dependency on container start you want to have a high rate check (like every second) to start the service as soon as possible. But once the containers are started you don't want to overload your service with health_checks.
Without this proposal, you need to wait
interval
time to discover your container is healthy and start the dependent containers even if the service was healthy a few seconds after being up.I propose to have a new parameter like
start_interval
to override theinterval
period during the start_period.Let take this config exemple:
This will perform a health check on every 1s during the start_period (from start to healthy stat, retry limit is ignored), then perform health check on every 30s with timeout & retry applied.
This is for reducing the downtime during stack restart and avoid to overload the health test after being started.
The text was updated successfully, but these errors were encountered: