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

Add health indicator for Hystrix #24

Closed
wjam opened this issue Oct 8, 2014 · 8 comments
Closed

Add health indicator for Hystrix #24

wjam opened this issue Oct 8, 2014 · 8 comments
Milestone

Comments

@wjam
Copy link

wjam commented Oct 8, 2014

The health of the Hystrix breakers should be reported as part of the health actuator; see http://java.dzone.com/articles/hystrix-and-spring-boots for an example.

@cdupuis cdupuis self-assigned this Oct 8, 2014
@cdupuis cdupuis added this to the 1.0.0.M2 milestone Oct 8, 2014
@cdupuis
Copy link
Contributor

cdupuis commented Oct 8, 2014

Very nice idea. Thanks for creating this.

@spencergibb
Copy link
Member

I would not recommend using out of service if circuit breakers are open. That is the point of Hystrix that the service does not go out of service.

@dsyer
Copy link
Contributor

dsyer commented Oct 9, 2014

Also there are already a bunch of metrics (in /metrics) from Hystrix, so if anyone wants to create a health indicator from them it should be easy (as long as per Spencer's comment) the status is UP by default when the circuit is open.

@cdupuis
Copy link
Contributor

cdupuis commented Oct 9, 2014

@spencergibb if the circuit is open, doesn't that mean the backend service is OUT_OF_SERVICE? That shouldn't indicate the caller is OUT_OF_SERVICE.

Therefore setting the entry for the backend service to OUT_OF_SERVICE in the result of the HealthIndicator would be fine, wouldn't it?

@cdupuis
Copy link
Contributor

cdupuis commented Oct 9, 2014

To illustrate: A -> Hystrix -> B

Now if the Hystrix circuit to B is open the result of a call to /health on A could return the following:

{
  "status" : "UP",
  "B" : {
    "status" : "OUT_OF_SERVICE"
    }
  }
}

or instead of using OUT_OF_SERVICE introduce a new CIRCUIT_OPEN status.

@dsyer
Copy link
Contributor

dsyer commented Oct 9, 2014

That makes sense. It's just the caller (the aggregate status) that should remain "UP".

@dsyer
Copy link
Contributor

dsyer commented Oct 22, 2014

There are some crossed wires here as well though. Hystrix itself is not aware of services (that's Ribbon, which confusingly has its own circuit breaker, and publishes metrics to gauge.servo.ZoneStats_CircuitBreakerTrippedCountetc.). But the Hystrix circuits are also visible (e.g. in the customers appgauge.hystrix.HystrixCommand.StoreIntegration.getStoresByLocationLink.rollingCountShortCircuited=2`).

@cdupuis
Copy link
Contributor

cdupuis commented Oct 28, 2014

This is now available in d715ec5.

@cdupuis cdupuis closed this as completed Oct 28, 2014
@wjam wjam unassigned cdupuis Jan 8, 2015
warmuuh added a commit to warmuuh/spring-cloud-netflix that referenced this issue Mar 19, 2015
documentation was not conform to specified behavior as in spring-cloud#24
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

4 participants