hystrix: threadpool: default: # 【groupKey, default为默认配置】 maximumSize: 10 # 【默认10,hystrix-core version >=5.7才支持】 coreSize: 10 #【默认10】 maxQueueSize: -1 #【默认为-1,代表SynchronousQueue,不使用队列缓冲。】 queueSizeRejectionThreshold: 5 # 【队列拒绝窗口,小于等于maxQueueSize,实现动态改变队列大小,如果maxQueueSize=-1,该配置不生效】 keepAliveTimeMinutes: 1 msv-providerapp-demo: # 根据应用访问量,对微服务线程池进行特殊配置。 该值对应@FeignClient 中的value,一般为serviceId。 maximumSize: 30 coreSize: 10 maxQueueSize: 1000 queueSizeRejectionThreshold: 1000 keepAliveTimeMinutes: 1 |
hystrix: command: default: #CommandKey 熔断器id , default为默认配置 execution: timeout: enabled: true # 默认开启 isolation: strategy: THREAD thread: timeoutInMilliseconds: 1000 # 默认超时1s circuitBreaker : enabled: true # 默认开启 sleepWindowInMilliseconds: 5000 #默认5000ms,熔断尝试关闭时间 requestVolumeThreshold: 20 #默认20, metrics.rollingStats.timeInMilliseconds: 10000 #【默认1000ms】秒内请求数>=requestVolumeThreshold,才使用熔断机制 errorThresholdPercentage: 50 #默认50%,当请求数达到requestVolumeThreshold要求,如果错误率达到 errorThresholdPercentage,则打开熔断 FeignProviderServer#callHi(String): # 根据接口,特殊化配置熔断器,接口commandkey命名规则见[2.1] execution: timeout: enabled: true # 默认开启 isolation: strategy: THREAD thread: timeoutInMilliseconds: 5000 # circuitBreaker : ………… |
内容版权声明:除非注明,否则皆为本站原创文章。
联系客服
扫码联系客服
返回顶部