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

  • 相关阅读:
    Docker 国内镜像源
    SeMF安装指南
    CGI environment variables
    OpenResty + ngx_lua_waf使用
    OpenResty源码编译安装
    Ubuntu安装DVWA
    C安全编码实践
    [译]The Complete Application Security Checklist
    HTTP 安全头配置
    AWVS 10.5使用指南
  • 原文地址:https://www.cnblogs.com/WcxyBlog/p/14054082.html
Copyright © 2011-2022 走看看