zoukankan      html  css  js  c++  java
  • hystrix实战总结;

    HystrixCircuitBreaker 有三种状态 :

    断路器默认是20个请求失败才打开短路器,可以进行配置:

    CLOSED :关闭

    OPEN :打开

    HALF_OPEN :半开

    1、接口正确,接口报超时;

    https://www.cnblogs.com/EasonJim/p/7722372.html

    2、springboot2.0后使用hystrix的监控必须得加:因为默认不是hystrix.stream

    @Bean
        public ServletRegistrationBean getServlet() {
            HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
            ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
            registrationBean.setLoadOnStartup(1);
            registrationBean.addUrlMappings("/hystrix.stream");
            registrationBean.setName("HystrixMetricsStreamServlet");
            return registrationBean;
        }
    

      加上后监控器才可以访问

    3、hystrix的的fallback触发机制详细介绍,这个博文非常好!!!!!!!

    fallback触发;

    https://blog.csdn.net/tongtong_use/article/details/78611225 

    https://blog.csdn.net/jack281706/article/details/73743024(也很详细)

  • 相关阅读:
    idea 相关
    dns 相关
    bash 相关
    建造者模式(Builder)
    C#中out 及 ref 区别
    C# 2.0新特性
    Asp.net.Ajax控件学习
    装饰模式(Decorator Pattern)
    职责链模式(Chain of Responsibility Pattern)
    面向对象
  • 原文地址:https://www.cnblogs.com/fengli9998/p/9257181.html
Copyright © 2011-2022 走看看