我正在尝试使用hystrix-javanica为我的应用程序实现hystrix。
我已经按如下配置了hystrix-configuration.properties
hystrix.command.default.execution.isolation.strategy=SEMAPHORE
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000
hystrix.command.default.fallback.enabled=true
hystrix.command.default.circuitBreaker.enabled=true
hystrix.command.default.circuitBreaker.requestVolumeThreshold=3
hystrix.command.default.circuitBreaker.sleepWindowInMilliseconds=50000
hystrix.command.default.circuitBreaker.errorThresholdPercentage=50
短路模式正常工作,但我对这个 hystrix.command.default.circuitBreaker.requestVolumeThreshold=3
有疑问:
- 它是指在3次失败后打开电路, 还是
- 在3个并发故障之后打开电路?
已查阅文档链接
有人能回答吗?
errorThresholdPercentage=50
%)进行断路,而非错误次数。在同一时间窗口内,必须满足最小调用量阈值(requestVolumeThreshold=3
,与我的初始答案相符),以使百分比计算具有统计学意义。 - mountain traveller