zoukankan      html  css  js  c++  java
  • 记Hystrix断路器官方文档

    记Hystrix断路器官方文档

    断路器CircuitBreaker执行流程

    1. 请求来临时,判断是否允许请求:通过判断成功和失败次数的比率与设置的threshold对比,如果大于那个值,就打开断路器。
    2. 当短路器打开以后,这个服务将不会提供服务,知道sleep时间到了,到了之后,开始允许一部分请求访问(实验性访问),此时为看开状态。如果访问通过,则关闭断路器,同时清空线程池;若访问没有成功,则进入closed state。

    Isolation

    Hystrix employs the bulkhead pattern to isolate dependencies from each other and to limit concurrent access to any one of them.

    Hystrix采用舱壁模式(bulkhead pattern)将依赖关系彼此隔离,并限制对其中的任何一个的并发访问。

    舱壁模式示意图

    Clients (libraries, network calls, etc) execute on separate threads. This isolates them from the calling thread (Tomcat thread pool) so that the caller may “walk away” from a dependency call that is taking too long.

    客户端(库,网络调用等)在单独的线程上执行。

    这样可以将它们与调用线程(Tomcat线程池)隔离,以便调用者可以“摆脱”花费太长时间的依赖项调用。

  • 相关阅读:
    SpringBoot项目部署与服务配置
    JDBC链接oracle已经mysql的测试
    Jedis工具类
    jsp&Sevelet基础详解
    Mysql和Oracle数据库concat()函数
    如何在maven工程中加载oracle驱动
    获取日期的相关方法
    SpringBoot配置Email发送功能
    spring中schedule注解的使用
    新建一个新的spring boot项目
  • 原文地址:https://www.cnblogs.com/WcxyBlog/p/14054082.html
Copyright © 2011-2022 走看看