zoukankan      html  css  js  c++  java
  • 网关的超时层级

    网关的超时层级

    zuul

    zuul:
      max:
        host:
          connections: 500
      host:
        socket-timeout-millis: 60000
        connect-timeout-millis: 60000

    ribbon

    ribbon:
      ReadTimeout: 10000
      ConnectTimeout: 10000
      MaxAutoRetries: 0
      MaxAutoRetriesNextServer: 1
      eureka:
        enabled: true

    hystrix

    hystrix:
      command:
        default:
          execution:
            timeout:
              enabled: true
            isolation:
              thread:
                timeoutInMilliseconds: 60000

    小结

    走网关的话,有三层的超时时间,一个是zuul的,一个是ribbon的,还有一个是hystrix的。hystrix的超时设置,AbstractRibbonCommand这个类没有暴露设置hystrix的Setter方法出来,所以无法通过继承的方式来扩展。因此要自定义ribbon超时的话,需要这个超时时间是小于hystrix的,不然就提前被hystrix超时了,无法起到效果。

  • 相关阅读:
    设计模式
    刷新所有视图存储过程
    js杨辉三角控制台输出
    2018申请淘宝客AppKey
    w3c标准 dom对象 事件冒泡和事件捕获
    promise原理
    vue virtual Dom
    css学习
    seo优化
    新概念学习
  • 原文地址:https://www.cnblogs.com/longling2344/p/8780611.html
Copyright © 2011-2022 走看看