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线程池)隔离,以便调用者可以“摆脱”花费太长时间的依赖项调用。

  • 相关阅读:
    linux命令(3)top
    linux命令(2)vmstat
    学习okhttp wiki--Connections.
    你可以更幸福(转载)
    Android中多表的SQLite数据库(译)
    怎样写有效的设计文档(译)
    Material Design说明
    Android原生Calendar代码阅读(一)
    Android Studio tips and tricks 翻译学习
    Material Calendar View 学习记录(二)
  • 原文地址:https://www.cnblogs.com/WcxyBlog/p/14054082.html
Copyright © 2011-2022 走看看