Skip to content

hystrix配置

iusofts edited this page Nov 26, 2018 · 1 revision

默认无需配置,如果希望替换默认值可以在根目录下添加,或者到管理界面中直接在线编辑

添加配置文件

hystrix.properties可以放在resources根目录下,主要是hystrix默认配置。 配置详解:https://github.com/Netflix/Hystrix/wiki/Configuration

# ******************** hystrix **********************
#his property sets the time in milliseconds after which the caller will observe a timeout and walk away from the command execution.
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=10000

hystrix.command.default.circuitBreaker.requestVolumeThreshold=100
#This property sets the error percentage at or above which the circuit should trip open and start short-circuiting requests to fallback logic.
hystrix.command.default.circuitBreaker.errorThresholdPercentage=75

hystrix.threadpool.default.coreSize=30
hystrix.threadpool.default.maxQueueSize=50000
# an artificial maximum queue size at which rejections will occur even if maxQueueSize has not been reached
hystrix.threadpool.default.queueSizeRejectionThreshold=45000