Hystrix WikicircuitBreaker.requestVolumeThreshold
This property sets the minimum number of requests in a rolling window that will trip the circuit.
For example, if the value is 20, then if only 19 requests are received in the rolling window (say a window of 10 seconds) the circuit will not trip open even if all 19 failed.
在一个bucket时间窗口内,此属性用于设置使熔断判断逻辑开始工作的最小请求数。(而不是最小失败请求数)
例如,如果值是20,那么如果在滚动窗口中只接收到19个请求(比如一个10秒的窗口),即便所有19个请求都失败了,熔断判断逻辑也不会被触发。
//com.netflix.hystrix.HystrixCircuitBreaker.HystrixCircuitBreakerImpl#isOpen
// check if we are past the statisticalWindowVolumeThreshold
if (health.getTotalRequests() < properties.circuitBreakerRequestVolumeThreshold().get()) {
// we are not past the minimum volume threshold for the statisticalWindow so we'll return false immediately and not calculate anything
return false;
}