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

Suggestion: Adding circuit braker #16

Closed
alanlavintman opened this issue Oct 13, 2016 · 1 comment
Closed

Suggestion: Adding circuit braker #16

alanlavintman opened this issue Oct 13, 2016 · 1 comment

Comments

@alanlavintman
Copy link

What do you say about providing circuit braker as well?
I was thinking about providing the following:
client.CircuitTreshold=10 (After 10 retries, disable the http client).
client.CircuitTimeout = 10000 (10 seconds timeout is whats considered a failure).

Thoughts?

@sethgrid
Copy link
Owner

Hi Alan. I've been on PTO; sorry for the late response. What would this do differently than client.MaxRetries and client.Timeout? As an alternative to putting something like this in pester, would you be able to embed the client and add those properties? Not sure if that would work for your use case.

From the Hystrix docs (the most popular circuit breaker of which I am aware):

Hystrix reports successes, failures, rejections, and timeouts to the circuit breaker, which maintains a rolling set of counters that calculate statistics.

It uses these stats to determine when the circuit should “trip,” at which point it short-circuits any subsequent requests until a recovery period elapses, upon which it closes the circuit again after first checking certain health checks.

My first thought is it might be a bit much to add into pester and perhaps there is a way to have two libs work together to achieve this result, keeping each a bit more thin.

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

2 participants