Open abhime42 opened 2 years ago
Hi, no it's not possible with the CircuitBreaker alone. But you can use the TimeLimiter to timeout a call when the response time threshold has been exceeded.
@RobWin no I don't want to TimeLimit all the requests. It's a cause of concern only when total slow requests are above a certain threshold (say 20%, which is captured with slow call rate threshold).
So there is no way to open circuit based on in flight requests?
No, right now there is no way.
Resilience4j version: 1.3.1
Java version: 11
I would like to know whether is it possible to open a circuit even before receiving response for current in flight http requests to external service when the slow call duration and slow call rate threshold has been breached by these calls?
Example: slidingWindowType: TIME_BASED slidingWindowSize: 10 Minimun calls: 10 Slow call rate threshold: 50% Slow call duration threshold: 2 sec
Say t=0, we started 20 http requests to external service B ( no new requests till t=2 sec) t=2 sec, none of the requests has been completed
So already 2 sec has elapsed, and 100% of the requests has breached slow call duration threshold. Now I would like to open the circuit without having the need to wait for all requests to complete.