Sentinel icon indicating copy to clipboard operation
Sentinel copied to clipboard

The total bucket count always is one for ExceptionCircuitBreaker and ResponseTimeCircuitBreaker, why?

Open ashore0805 opened this issue 2 years ago • 2 comments

Issue Description

public ResponseTimeCircuitBreaker(DegradeRule rule) {
    this(rule, new SlowRequestLeapArray(1, rule.getStatIntervalMs()));
}


public ExceptionCircuitBreaker(DegradeRule rule) {
    this(rule, new SimpleErrorCounterLeapArray(1, rule.getStatIntervalMs()));
}

ashore0805 avatar Dec 05 '23 11:12 ashore0805

IMO, CircuitBreaker does not need multiple buckets for pulsed traffic scenarios, reusing a single bucket is sufficient.

LearningGp avatar Dec 30 '23 02:12 LearningGp