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

  • 相关阅读:
    分治法求最大子序列
    6.2 链表 (UVa 11988, 12657)
    6.1 栈和队列 (UVa 210, 514, 442)
    S-Tree (UVa 712) 二叉树
    Equilibrium Mobile (UVa 12166) dfs二叉树
    Patrol Robot (UVa 1600) BFS
    Knight Moves (UVa 439) BFS
    Tree Recovery (UVa 536) 递归遍历二叉树
    Parentheses Balance (Uva 673) 栈
    Self-Assembly (UVa 1572)
  • 原文地址:https://www.cnblogs.com/WcxyBlog/p/14054082.html
Copyright © 2011-2022 走看看