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

Recovering from half-open state based on a success threshold #73

Open
kevkcc opened this issue Apr 4, 2023 · 1 comment
Open

Recovering from half-open state based on a success threshold #73

kevkcc opened this issue Apr 4, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kevkcc
Copy link

kevkcc commented Apr 4, 2023

Hi, was wondering if there were plans and/or a suggested workaround for recovering from a half-open state based on a success threshold as described in Microsoft's circuit breaker pattern page: https://learn.microsoft.com/en-us/azure/architecture/patterns/circuit-breaker

Currently, the behaviour in cockatiel (as well as opossum) is we have one trial call and if this call succeeds, we recover back into the closed state and if this call fails, we fail back into the open state (0% error rate on 1 call). But maybe we want less than 30% error rate on the next 10 calls for instance.

Resilience4j offers something along these lines with permittedNumberOfCallsInHalfOpenState: https://javadoc.io/static/io.github.resilience4j/resilience4j-circuitbreaker/1.2.0/io/github/resilience4j/circuitbreaker/CircuitBreakerConfig.Builder.html#permittedNumberOfCallsInHalfOpenState-int-

Thanks for creating this great library!

@connor4312 connor4312 added the enhancement New feature or request label Apr 4, 2023
@connor4312
Copy link
Owner

Would be happy to add this. PR's welcome if you're up for it.

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

No branches or pull requests

2 participants