Skip to content
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

Healthchecks (init stage and monitoring separation) #4646

Closed
earthquakesan opened this issue Mar 21, 2017 · 2 comments
Closed

Healthchecks (init stage and monitoring separation) #4646

earthquakesan opened this issue Mar 21, 2017 · 2 comments

Comments

@earthquakesan
Copy link

Hello everyone! This is a call for a discussion regarding healthchecks. We are using them in BigDataEurope project to control start-up sequence of complex applications, consisting of microservices (packed into Docker).

At the moment, healthchecks defined inside a Dockerfile will be fired every N seconds during the whole duration of life of a container.
Sometimes it is not desirable as a lot of healthchecks can produce unnecessary requests on running container.
So the problem is that the configuration for healthchecks after container become healthy (i.e. monitoring) and healthchecks occuring from starting to healthy or unhealthy (i.e. initialization) cannot be specified independently.

Setting long monitoring intervals may be appropriate to avoid a lot of checks on the running container. However, this causes a long delay for the first healthcheck after container start and slows down the start up of dependent containers.
For initialization, a container should be marked as healthy as soon as possible.
Thus a short interval is useful; many retries may be specified, in order to handle occasional long initialization.
But the short interval causes a high frequency of healthchecks at monitoring.

Would it be appropriate to separate initialization and monitoring stages of healthchecks? The following options (with example values) may provide an idea we have inside one of our project running on Docker.

  • init_delay: 3s
    specifies the time to wait after container start until the first healthcheck is executed.

    • success: the container status changes to healthy
    • failure: the container remains in state starting
  • init_retries: 3

    • success: the container status changes to healthy
    • failure: the container remains in state starting
      but if all retries failed, the status is set to unhealthy

There should be possibility to disable init healthchecks the same way as for normal healthchecks.

@ksylla @madnificent

@shin-
Copy link

shin- commented Mar 21, 2017

Hi!

This is actually an engine feature you're asking about, not a docker-compose feature. You will want to chime in here moby/moby#26664 or here moby/moby#30860

@earthquakesan
Copy link
Author

Hi!

Thanks for pointing out. I think, we can close this one. -)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants