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

waitThreshold is too high by default #108

Open
dhet opened this issue Dec 19, 2018 · 1 comment
Open

waitThreshold is too high by default #108

dhet opened this issue Dec 19, 2018 · 1 comment

Comments

@dhet
Copy link

dhet commented Dec 19, 2018

The default setting for waitThreshold is currently set to 100 which is way too high IMO.
Imagine a scenario in which the backend system becomes unresponsive and stays broken for a few hours. Assuming you set the circuitDuration to 30 seconds, you would dish out 100 failing requests before opening the circuit breaker again - every 30 seconds. Don't you think that 100 requests is a bit too much for a system which is already struggling?

Of course it is up to the user to tweak the waitThreshold according to their needs but speaking of myself personally, I was very confused when I tried the library in my project and the circuit breaker wouldn't open immediately even though the failure rate was at 100%.

I would think that a waitThreshold of 5 to 10 would be much more appropriate.

@dhet dhet changed the title waitThreshold is too high by default waitThreshold is too high by default Dec 19, 2018
@awolden
Copy link
Owner

awolden commented Feb 27, 2019

I agree it is higher than one would normally want it, but I would be hesitant to change it in a non-breaking version and have it inadvertently change the behavior for users.

Thanks for the suggestion though!

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