标签:监控 res sem eject read ocs max util back
设置隔离策略
execution.isolation.strategy = THREAD
设置超时时间
execution.isolation.thread.timeoutInMilliseconds = 1000
信号量隔离策略设置最大并发请求数(仅在信号量隔离策略下生效)
execution.isolation.semaphore.maxConcurrentRequests = 10
设置最大Fallback数量
fallback.isolation.semaphore.maxConcurrentRequests = 10
设置熔断器滑动窗口最小任务
circuitBreaker.requestVolumeThreshold = 20
设置熔断器持续时间
circuitBreaker.sleepWindowInMilliseconds = 5000
设置触发熔断器的失败任务阈值(百分比)
circuitBreaker.errorThresholdPercentage = 50
设置Metrics监视器的范围时间(过去多少ms内)
metrics.rollingStats.timeInMilliseconds = 10000
设置监视器内桶的数量(将监视器范围划分为若干块)
metrics.rollingStats.numBuckets= 10
设置线程池容量
coreSize = 10
设置阻塞队列长度(优先级高于queueSizeRejectionThreshold,且一旦初始化就不能更改 )
maxQueueSize = -1
动态设置阻塞队列长度
queueSizeRejectionThreshold = 5
空闲线程存活时间
keepAliveTimeMinutes= 1
线程池监控窗口时间范围(10s内)
metrics.rollingStats.timeInMilliseconds = 10000
设置线程池监控滑动窗口的桶数量
metrics.rollingStats.numBuckets = 500
Note:窗口时间必须为桶数量的整数倍,否则会抛出异常
关于Hystrix线程池:
LinkedBlockingQueue时可以设置
queueSizeRejectionThreshold调整队列拒绝阈值Thread Size = peak healthy × 99th percentile latency in seconds + some breathing room(线程池大小 = 峰值QPS * 99耗时 + 预留空间 )
超时设定标准:
With retry,Time = 99th mean-time + 50th mean-time
Without Retry,Time = 99.5meantime
标签:监控 res sem eject read ocs max util back
原文地址:http://www.cnblogs.com/java-synchronized/p/7927789.html