brpc icon indicating copy to clipboard operation
brpc copied to clipboard

HealthCheck检查失败,如果发生了熔断,next check time是不是应该改成熔断后的时间

Open dandyhuang opened this issue 2 years ago • 5 comments

image

请教一下,next_abstime是不是应该取的circuit_breaker.isolation_duration_ms时间呢 @TousakaRin

dandyhuang avatar Sep 28 '23 02:09 dandyhuang

circuit_breaker.isolation_duration_ms() 只是控制SetFailed()之后第一次健康检查的时间,后续的检查间隔还是由health_check_interval来控制

wwbmmm avatar Oct 12 '23 07:10 wwbmmm

circuit_breaker.isolation_duration_ms() 只是控制SetFailed()之后第一次健康检查的时间,后续的检查间隔还是由health_check_interval来控制

为什么这么设计呢

dandyhuang avatar Oct 12 '23 07:10 dandyhuang

我理解这是为一种退避策略吧

chenBright avatar Oct 12 '23 07:10 chenBright

我理解这是为一种退避策略吧

我感觉是之前的隔离是不是漏改了这个。应该判断是隔离的错误码,就使用隔离的时间来处理吧。 退避策略这个在UpdateIsolationDuration已经有实现了

dandyhuang avatar Oct 12 '23 07:10 dandyhuang

嗯嗯,我说的退避策略也是指IsolationDuration

chenBright avatar Oct 12 '23 08:10 chenBright