Hystrix配置文件配置


断路器:
hystrix.command.default.circuitBreaker.requestVolumeThreshold(当在配置时间窗口内达到此数量的失败后,进行短路。默认20个)
#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.
hystrix.command.default.circuitBreaker.sleepWindowInMilliseconds(短路多久以后开始尝试是否恢复,默认5s)
hystrix.command.default.circuitBreaker.errorThresholdPercentage(出错百分比阈值,当达到此阈值后,开始短路。默认50%)
fallback:
hystrix.command.default.fallback.isolation.semaphore.maxConcurrentRequests(调用线程允许请求HystrixCommand.GetFallback()的最大数量,默认10。超出时将会有异常抛出,注意:该项配置对于THREAD隔离模式也起作用)
#Hystrix线程池配置
hystrix:
# 在调用方配置,被该调用方的指定方法(HystrixCommandKey方法名)的超时时间是该值
command:
findById: #方法名(HystrixCommandKey)
execution:
isolation:
thread:
timeoutInMilliseconds: 30000
default:
circuitBreaker:
# 当在配置时间窗口内达到此数量的失败后,进行短路。默认20个;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.
requestVolumeThreshold: 20
sleepWindowInMilliseconds: 50000 #短路5秒钟,尝试恢复
errorThresholdPercentage: #出错百分比阈值 # 线程池核心线程数
threadpool:
default:
coreSize: 15
# 最大排队长度。默认-1,使用SynchronousQueue。其他值则使用 LinkedBlockingQueue。如果要从-1换成其他值则需重启,即该值不能动态调整,若要动态调整,需要使用到下边这个配置
maxQueueSize: -1
# 排队线程数量阈值,默认为5,达到时拒绝,如果配置了该选项,队列的大小是该队列
queueSizeRejectionThreshold:

最新文章

  1. 基于SOUI开发的应用展示
  2. C# Excel 为图表添加模拟运算表
  3. Linux命令学习总结:rm命令
  4. .net aes加密视频等文件
  5. 最小生成树之Kruskal算法
  6. Order to Cash Process
  7. Shell脚本报错unary operator expected
  8. SQL Server备份事务日志结尾(Tail)
  9. 心跳之旅—💗—iOS用手机摄像头检测心率(PPG)
  10. HDU 3123-GCC(递推)
  11. fopen()函数以"a+"方式打开一个不存在的文件后读写出现问题
  12. java 多线程 一个博客
  13. Java 线程宝典
  14. Web部分
  15. JAVA线程池的实际运用
  16. bootstrapTable
  17. python自动化开发-6
  18. Spring AOP学习笔记
  19. iOS.Info.plist
  20. 9个基于Java的搜索引擎

热门文章

  1. 2-sat——poj3678经典建图
  2. 使用vue-awesome-swiper滑块插件
  3. PHP如何打造一个高可用高性能的网站呢?
  4. 菜鸟nginx源码剖析数据结构篇(三) 单向链表 ngx_list_t[转]
  5. iOS开发CoreData的简单使用
  6. 隐藏/显示jeecg-boot 后端管理页面的右侧的系统设置
  7. re 模块 (正则的使用)
  8. if __name__=='__main__'使用场景,彻底明白
  9. SpringMVC处理请求的大致流程是怎么样的
  10. 关于不同数据库的连接配置(MySql和Oracle)