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 circuit breaker #38

Open
nicl opened this issue Jul 16, 2014 · 4 comments
Open

Add circuit breaker #38

nicl opened this issue Jul 16, 2014 · 4 comments

Comments

@nicl
Copy link
Contributor

nicl commented Jul 16, 2014

@robertberry suggested adding a circuit breaker to the client to ensure good behaviour in the case of problems.

Let's discuss and if agreed, implement.

@robertberry-zz
Copy link
Contributor

This is common practice at Netflix (see http://techblog.netflix.com/2011/12/making-netflix-api-more-resilient.html for example, but there's lots of stuff on their blogs). I think building it into the client, and having it turned on by default, makes the most sense. It'd help you in situations where you have too many requests to ElasticSearch, etc., queued up, or the web boxes are saturated.

@tackley @philwills What do you guys think?

@philwills
Copy link
Contributor

Yup, this seems like exactly the kind of way that having a client library can add value. Having said that it should be obvious in docs and moan loudly when it fires.

@mchv
Copy link
Member

mchv commented Jul 16, 2014

I am not sure what exactly a circuit breaker means on client side, but I agree the client should provide more values that just the raw API. I had 2 ideas in mind:

  • 503 response: The client should be able to wait for a delay and retry before serving the error response to the user.
  • Cache headers: The client should be able to cache response following cache headers and directive, exactly like a browser does.

@robertberry-zz
Copy link
Contributor

This explains the concept: http://martinfowler.com/bliki/CircuitBreaker.html

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

No branches or pull requests

4 participants