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

Introduce Sticky health indicator #16275

Closed
wants to merge 1 commit into from

Conversation

fvlad
Copy link

@fvlad fvlad commented Mar 20, 2019

Hi,

We have lots of microservices running in K8s on production and and we use their /health endpoints to check whether everything is OK or not. Sometimes we have issues that that some health dependency gets broken (for example a temporal problem with a database) and the whole health of the service goes DOWN. This is the desired behaviour for most of the health indicators, but for some of them a DOWN health indicator should not stop traffic coming to the service, as the dependency might not be very important. But I would still like to have those health indicators, so that at least on startup I can be sure that some connection and credentials are defined correct.

The idea behind this PR is to be able to define a list of those special health indicators with some configuration like this: management.health.status.sticky[0]=myindicator. Sticky health indicator must get UP at least once (on startup), and then it will always stay UP. In case the original health indicator goes to DOWN or any other, the status is still shown UP, but original status and original details are provided inside the details.

I can add more tests and reactive health indicators support if needed.
WDYT?

Fix indentation

Revert: Introduce Sticky health indicator

Revert: Introduce Sticky health indicator
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 20, 2019
@wilkinsona
Copy link
Member

Thanks for the proposal. I think we'd prefer to tackle this slightly differently by allowing health indicators to be grouped. This would allow, for example, a group for liveness checks and a group for readiness checks. This change is being tracked by #14022 and we hope to include it in 2.2.0. Thanks anyway.

@wilkinsona wilkinsona closed this Mar 20, 2019
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants