SpringCloud系列服務(wù)容錯(cuò)保護(hù)Netflix Hystrix(springcloud容錯(cuò)機(jī)制)

      網(wǎng)友投稿 819 2022-05-30

      1. 什么是雪崩效應(yīng)?

      微服務(wù)環(huán)境,各服務(wù)之間是經(jīng)常相互依賴的,如果某個(gè)不可用,很容易引起連鎖效應(yīng),造成整個(gè)系統(tǒng)的不可用,這種現(xiàn)象稱為服務(wù)雪崩效應(yīng)。

      如圖,引用國外網(wǎng)站的圖例:https://www.javatpoint.com/fault-tolerance-with-hystrix#,如圖系統(tǒng)各種服務(wù)相互調(diào)用,一旦一個(gè)服務(wù)出現(xiàn)問題,假如系統(tǒng)沒有熔斷器,很容易影響其它模塊使用

      可用自己畫圖表示這種情況,如圖:A作為服務(wù)提供者,B為A的服務(wù)消費(fèi)者,C和D是B的服務(wù)消費(fèi)者。A不可用引起了B的不可用,像滾雪球一樣放大到C和D時(shí),雪崩效應(yīng)就形成了。當(dāng)然也不一定是服務(wù)提供者出現(xiàn)問題,也有可能是消費(fèi)者出現(xiàn)問題

      從兩個(gè)方面來分析服務(wù)雪崩產(chǎn)生的原因:

      服務(wù)提供者

      服務(wù)提供者出現(xiàn)問題,一般都是影響調(diào)用的服務(wù)消費(fèi)者,然后造成連鎖反應(yīng)

      服務(wù)消費(fèi)者

      服務(wù)消費(fèi)者方面,主要表現(xiàn)在同步調(diào)用等待結(jié)果導(dǎo)致資源緊張,ps:還有一種特殊情況是,服務(wù)既是服務(wù)提供者,又是服務(wù)消費(fèi)者

      2. 什么是熔斷器模式

      熔斷器(CircuitBreaker),英文是CircuitBreaker,軟件設(shè)計(jì)中的熔斷器模式實(shí)現(xiàn),思路是用一個(gè)函數(shù)調(diào)用在斷路器保護(hù)對(duì)象,對(duì)故障監(jiān)控。失敗達(dá)到一定閾值后,斷路器工作,接口調(diào)用返回一個(gè)錯(cuò)誤,以達(dá)到保護(hù)系統(tǒng),預(yù)防線程資源被大量占用,造成系統(tǒng)雪崩的情況

      引用https://martinfowler.com/bliki/CircuitBreaker.html的圖例,如圖給出了一個(gè)簡(jiǎn)單的軟件中的熔斷器模式設(shè)計(jì)方案:

      服務(wù)的健康狀況 = 請(qǐng)求失敗數(shù) / 請(qǐng)求總數(shù)

      ps:熔斷器的開關(guān)狀態(tài)轉(zhuǎn)換是通過當(dāng)前服務(wù)健康狀況和設(shè)定閾值比較決定的

      服務(wù)健康狀況低于設(shè)定的閾值時(shí),熔斷器開關(guān)是關(guān)閉的,如果當(dāng)前服務(wù)健康狀況大于設(shè)置閾值,開關(guān)打開

      熔斷器的開關(guān)打開后,所有請(qǐng)求都會(huì)被攔截,過一段時(shí)間后,開關(guān)狀態(tài)變?yōu)榘腴_(half open)

      熔斷器半開(half open)狀態(tài)是允許一個(gè)請(qǐng)求通過的,當(dāng)該請(qǐng)求調(diào)用成功時(shí), 熔斷器恢復(fù)到關(guān)閉狀態(tài).,若該請(qǐng)求失敗, 熔斷器繼續(xù)保持打開狀態(tài)

      3. 什么是Netflix Hystrix?

      Hystrix 是由 Netflix 發(fā)布的針對(duì)微服務(wù)分布式系統(tǒng)的熔斷保護(hù)中間件,是一種很好地預(yù)防服務(wù)雪崩的中間件,其實(shí)比較像電路中的保險(xiǎn)絲,一旦某個(gè)服務(wù)不可用,導(dǎo)致暫用了線程資源等情況發(fā)生時(shí),熔斷器開啟,不允許其它服務(wù)繼續(xù)調(diào)用,導(dǎo)致系統(tǒng)雪崩

      引用官網(wǎng)Wiki的解釋:

      In a distributed environment, inevitably some of the many service dependencies will fail. Hystrix is a library that helps you control the interactions between these distributed services by adding latency tolerance and fault tolerance logic. Hystrix does this by isolating points of access between the services, stopping cascading failures across them, and providing fallback options, all of which improve your system’s overall resiliency.

      中文翻譯:在分布式環(huán)境中,不可避免的一些很多服務(wù)依賴關(guān)系將會(huì)失敗。Hystrix是一個(gè)庫,可以幫助你控制這些分布式服務(wù)之間的交互通過添加延遲寬容和容錯(cuò)邏輯。Hystrix通過孤立點(diǎn)之間的訪問服務(wù),停止在級(jí)聯(lián)故障,并提供后備選項(xiàng),所有這些改善您的系統(tǒng)的整體彈性。

      4、Hystrix的工作原理

      引用官網(wǎng)wiki的圖片,簡(jiǎn)單介紹Hystrix的工作原理,點(diǎn)此查看大圖

      Hystrix的工作過程:

      構(gòu)造一個(gè)HystrixCommand或HystrixObservableCommand對(duì)象

      執(zhí)行命令

      響應(yīng)是否已緩存?

      電路開路了嗎?

      線程池隊(duì)列/信號(hào)量是否已滿?

      HystrixObservableCommand.construct() 或者 HystrixCommand.run()

      計(jì)算電路健康

      獲取后備

      返回成功的回應(yīng)

      1、構(gòu)造一個(gè)HystrixCommand或HystrixObservableCommand對(duì)象

      構(gòu)建一個(gè) HystrixCommand 或者 HystrixObservableCommand 對(duì)象,將請(qǐng)求包裝到 Command 對(duì)象中

      2、執(zhí)行命令

      Hystrix執(zhí)行命令有如下4種方法:

      ps:前兩種僅適用于簡(jiǎn)單HystrixCommand對(duì)象,不適用于HystrixObservableCommand

      execute() :阻止,然后返回從依賴項(xiàng)接收的單個(gè)響應(yīng)(或在發(fā)生錯(cuò)誤的情況下引發(fā)異常)

      queue():返回一個(gè)Future,您可以從中獲得依賴項(xiàng)的單個(gè)響應(yīng)

      observe():訂閱,該Observable代表表示從依賴項(xiàng)返回的響應(yīng),并返回Observable復(fù)制的。

      toObservable():返回一個(gè)Observable,當(dāng)您訂閱它時(shí),將執(zhí)行Hystrix命令并發(fā)出其響應(yīng)

      K value = command.execute(); Future fValue = command.queue(); Observable ohValue = command.observe(); //hot observable Observable ocValue = command.toObservable(); //cold observable

      1

      2

      3

      4

      3、響應(yīng)是否已緩存?

      判斷當(dāng)前請(qǐng)求是否有緩存,如果在緩存中就直接返回緩存的內(nèi)容。詳情可以參考官方比較詳細(xì)介紹:https://github.com/Netflix/Hystrix/wiki/How-it-Works#RequestCaching

      4、電路開路了嗎?

      判斷斷路器是否處于打開的狀態(tài),如果是打開狀態(tài),那么 Hystrix 就不再會(huì)去執(zhí)行命令,直接跳到第 8 步,獲取 fallback 方法,執(zhí)行 fallback 邏輯。如果斷路器沒有打開,那么繼續(xù)執(zhí)行

      5、線程池隊(duì)列/信號(hào)量是否已滿?

      Hystrix的隔離模式有兩種:

      線程池隊(duì)列模式

      信號(hào)量模式

      如果是線程池隔離模式,會(huì)判斷線程池隊(duì)列的容量,如果是信號(hào)量隔離模式,會(huì)判斷信號(hào)量的值,如果線程池和信號(hào)量都已經(jīng)滿了,那么同樣請(qǐng)求不會(huì)再執(zhí)行,會(huì)直接跳到第 8 步(fallback過程),如果未滿那么繼續(xù)執(zhí)行

      6、HystrixObservableCommand.construct() 或者 HystrixCommand.run()

      在這里,Hystrix通過如下方法調(diào)用對(duì)依賴項(xiàng)的請(qǐng)求,有兩種方法,其中一種執(zhí)行:

      HystrixCommand.run():返回一個(gè)響應(yīng)或者拋出一個(gè)異常

      HystrixObservableCommand.construct():返回一個(gè)可觀測(cè)的,發(fā)出響應(yīng)(s)或發(fā)送一個(gè)onError通知

      7、計(jì)算電路健康

      Hystrix向斷路器報(bào)告成功,失敗,拒絕和超時(shí),斷路器保持滾動(dòng)的一組計(jì)算統(tǒng)計(jì)信息,它使用這些統(tǒng)計(jì)信息來確定電路何時(shí)應(yīng)“跳閘”,在該時(shí)間點(diǎn)它會(huì)將隨后的所有請(qǐng)求短路,直到經(jīng)過恢復(fù)期為止,在此之后,在首先檢查某些運(yùn)行狀況檢查之后,情況正常,電路會(huì)再次閉合

      8、獲取后備

      所謂的獲取后備,其實(shí)就是系統(tǒng)發(fā)生異常時(shí),執(zhí)行后備函數(shù),也就是fallback操作,Hystrix嘗試在命令執(zhí)行失敗時(shí)恢復(fù)到您的后備狀態(tài):當(dāng)construct()或引發(fā)異常run()(6.),由于電路斷開而使命令短路(4.),命令的線程池和隊(duì)列或信號(hào)量為最大容量(5.),或者命令已超過其超時(shí)長(zhǎng)度。

      9、返回成功的響應(yīng)

      如果Hystrix命令成功執(zhí)行,它將以的形式將一個(gè)或多個(gè)響應(yīng)返回給調(diào)用方Observable,官方圖例說明:

      5、Hystrix的設(shè)計(jì)原則

      ok,接著歸納一下Hystrix的主要設(shè)計(jì)原則,或者特征,參考官方的wiki,我們可以看到Hystrix的一些主要特征

      封裝請(qǐng)求

      Hystrix封裝請(qǐng)求由 HystrixCommand 或者 HystrixObservableCommand 類實(shí)現(xiàn),將請(qǐng)求包裝到 Command 對(duì)象中,接著執(zhí)行,主要4種方法

      K value = command.execute(); Future fValue = command.queue(); Observable ohValue = command.observe(); //hot observable Observable ocValue = command.toObservable(); //cold observable

      1

      2

      3

      4

      資源隔離

      資源隔離減少風(fēng)險(xiǎn)的方式被稱為:Bulkheads(艙壁隔離模式)

      引用https://segmentfault.com/a/1190000005988895的圖例:

      在Hystrix軟件設(shè)計(jì)中也是基于這種設(shè)計(jì)理念,艙壁隔離模式。Hystrix的隔離模式有兩種: 線程池隊(duì)列模式、信號(hào)量模式

      熔斷器模式

      Hystrix采用了熔斷器模式,相當(dāng)于電路中的保險(xiǎn)絲,系統(tǒng)出現(xiàn)緊急問題,立刻禁止所有請(qǐng)求,已達(dá)到保護(hù)系統(tǒng)的作用

      命令模式

      Hystrix使用命令模式(繼承HystrixCommand類)來實(shí)現(xiàn)具體的服務(wù)調(diào)用邏輯(run方法), 并在命令模式中添加了服務(wù)調(diào)用失敗后的fallback邏輯,這是命令模式的很好應(yīng)用

      要求折疊

      通過實(shí)現(xiàn)HystrixCollapser類,實(shí)現(xiàn)這種場(chǎng)景,可以將多個(gè)請(qǐng)求折疊到單個(gè)后端依賴項(xiàng)調(diào)用

      引用官網(wǎng)圖片,下圖顯示了兩種情況下的線程和網(wǎng)絡(luò)連接數(shù):首先是沒有連接,然后是請(qǐng)求折疊

      請(qǐng)求緩存

      HystrixCommand和HystrixObservableCommand實(shí)現(xiàn)可以定義一個(gè)緩存鍵然后請(qǐng)求中用于de-dupe調(diào)用上下文concurrent-aware的方式

      6、Netflix Hystrix例子實(shí)踐

      Hystrix常被應(yīng)用于微服務(wù)項(xiàng)目中,feign、ribbon等中間件都有默認(rèn)集成,本例子基于spring cloud進(jìn)行實(shí)踐

      環(huán)境準(zhǔn)備:

      JDK 1.8

      SpringBoot2.2.3

      SpringCloud(Hoxton.SR6)

      Maven 3.2+

      開發(fā)工具

      IntelliJ IDEA

      smartGit

      創(chuàng)建一個(gè)SpringBoot Initialize項(xiàng)目,詳情可以參考我之前博客:SpringBoot系列之快速創(chuàng)建項(xiàng)目教程

      可以引入Eureka Discovery Client

      Eureka Discovery Client默認(rèn)集成spring-cloud-netflix-hystrix

      不加上Eureka Discovery Client的情況,需要自己?jiǎn)为?dú)添加Hystrix

      Hoxton.SR6版本不支持@HystrixCommand?所以需要自己加上配置:

      com.netflix.hystrix hystrix-javanica RELEASE

      1

      2

      3

      4

      5

      本博客的是基于spring-cloud-starter-netflix-eureka-client進(jìn)行試驗(yàn),試驗(yàn)前要運(yùn)行eureka服務(wù)端,eureka服務(wù)提供者,代碼請(qǐng)參考上一章博客

      加上@EnableCircuitBreaker支持服務(wù)降級(jí)

      package com.example.springcloud.hystrix; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication @EnableCircuitBreaker @EnableEurekaClient public class SpringcloudHystrixApplication { public static void main(String[] args) { SpringApplication.run(SpringcloudHystrixApplication.class, args); } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      新建bootstrap.yml,yaml配置:

      server: port: 8082 # 必須指定application name spring: application: name: ribbon-hystrix-service-consumer eureka: client: service-url: defaultZone: http://localhost:8761/eureka/ healthcheck: enabled: false # 支持服務(wù)發(fā)現(xiàn) fetch-registry: true # 不支持服務(wù)注冊(cè) register-with-eureka: false instance: status-page-url-path: http://localhost:8761/actuator/info health-check-url-path: http://localhost:8761/actuator/health prefer-ip-address: false instance-id: ribbon-hystrix-service-consumer8082 metadata-map: cluster: ribbon

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      @LoadBalanced支持負(fù)載均衡:

      package com.example.springcloud.hystrix.configuration; import com.netflix.ribbon.proxy.annotation.Hystrix; import org.springframework.cloud.client.loadbalancer.LoadBalanced; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.client.RestTemplate; /** *

       * RestConfiguration * 
      * *
       * @author mazq * 修改記錄 * 修改后版本: 修改人: 修改日期: 2020/07/31 09:43 修改內(nèi)容: * 
      */ @Configuration public class RestConfiguration { @Bean @LoadBalanced public RestTemplate restTemplate() { return new RestTemplate(); } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      User.java:

      package com.example.springcloud.hystrix.bean; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.Data; import java.io.Serializable; /** *

       * User * 
      * *
       * @author mazq * 修改記錄 * 修改后版本: 修改人: 修改日期: 2020/07/27 17:38 修改內(nèi)容: * 
      */ @JsonIgnoreProperties(ignoreUnknown = true) @Data public class User implements Serializable { private String name; private String blog; @Override public String toString() { return "User{" + "name='" + name + '\'' + ", blog='" + blog + '\'' + '}'; } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

      @HystrixCommand(fallbackMethod = "userApiFallback")指定異常后的回調(diào)方法

      package com.example.springcloud.hystrix.controller; import com.example.springcloud.hystrix.bean.User; import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.client.RestTemplate; /** *

       * RestController * 
      * *
       * @author mazq * 修改記錄 * 修改后版本: 修改人: 修改日期: 2020/08/01 16:59 修改內(nèi)容: * 
      */ @org.springframework.web.bind.annotation.RestController @Slf4j public class RestController { @Autowired RestTemplate restTemplate; /** * @HystrixCommand注解指定異常時(shí)調(diào)用的方法 * @Author mazq * @Date 2020/08/01 18:17 * @Param [username] * @return */ @GetMapping("/findUser/{username}") @HystrixCommand(fallbackMethod = "userApiFallback") public User index(@PathVariable("username")String username){ return restTemplate.getForObject("http://EUREKA-SERVICE-PROVIDER/api/users/"+username,User.class); } public User userApiFallback(String username) { log.info("fallback方法,接收的參數(shù):username = {}",username); User user = new User(); user.setName("defaultUser"); user.setBlog("https://smilenicky.blog.csdn.net"); return user; } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      SpringCloud系列之服務(wù)容錯(cuò)保護(hù)Netflix Hystrix(springcloud容錯(cuò)機(jī)制)

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      33

      34

      35

      36

      37

      38

      39

      40

      41

      42

      43

      44

      45

      46

      47

      48

      49

      50

      7、Feign項(xiàng)目使用Hystrix

      pom配置:

      org.springframework.cloud spring-cloud-starter-openfeign

      1

      2

      3

      4

      openfeign中間件是默認(rèn)集成Hystrix的,所以主要fallback參數(shù)指定具體實(shí)現(xiàn)類既可

      package com.example.springcloud.hystrix.component; import com.example.springcloud.hystrix.bean.User; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @FeignClient(name = "eureka-service-provider", fallback = FeignHystrixClientFallback.class) public interface FeignHystrixClient { @RequestMapping(value = "/api/users/{username}",method = RequestMethod.GET) User findGithubUser(@PathVariable("username") String username); }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      實(shí)現(xiàn)FeignHystrixClient 接口

      package com.example.springcloud.hystrix.component; import com.example.springcloud.hystrix.bean.User; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** *

       * FeignHystrixClientFallback * 
      * *
       * @author mazq * 修改記錄 * 修改后版本: 修改人: 修改日期: 2020/08/03 09:58 修改內(nèi)容: * 
      */ @Slf4j @Component public class FeignHystrixClientFallback implements FeignHystrixClient { @Override public User findGithubUser(String username) { log.info("fallback方法,接收的參數(shù):username = {}",username); User user = new User(); user.setName("defaultUser"); user.setBlog("https://smilenicky.blog.csdn.net"); return user; } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      8、Hystrix dashboard監(jiān)控

      Hystrix dashboard提供了對(duì)微服務(wù)模塊進(jìn)行監(jiān)控的功能

      maven配置

      org.springframework.cloud spring-cloud-netflix-hystrix-dashboard org.springframework.boot spring-boot-starter-actuator

      1

      2

      3

      4

      5

      6

      7

      8

      @EnableHystrixDashboard加在Application類上,開啟Hystrix dashboard監(jiān)控

      允許后,訪問,http://localhost:8082/hystrix,格式為http://localhost:port/hystrix

      spring-boot-starter-actuator其實(shí)就已經(jīng)有提供監(jiān)控的,鏈接http://localhost:8082/actuator/hystrix.stream,Hystrix dashboard其實(shí)是對(duì)這些數(shù)據(jù)進(jìn)行界面可視化監(jiān)控,所以項(xiàng)目要先集成spring-boot-starter-actuator

      ps:spring-boot-starter-actuator 2.2.3版本要加上actuator前端,才能訪問,網(wǎng)上很多教程都是基于之前版本,不需要加上,而本博客基于2.2.3 SpringBoot 版本

      ok,接著發(fā)現(xiàn)2.2.3版本的bug,f12調(diào)試,發(fā)現(xiàn)前端報(bào)錯(cuò),導(dǎo)致Hystrix dashboard監(jiān)控頁面一直loading

      找到github issue:https://github.com/MadeInChina/spring-cloud-netflix/commit/afc1d989767d0a21524b865dafeebc37d4c78e04,處理方法是反編譯jar,找到如圖文件,修改,然后再放回jar

      這種比較麻煩,或許可以回退一下版本,用回2.2.2版本,maven配置:

      org.springframework.cloud spring-cloud-starter-netflix-hystrix-dashboard org.springframework.cloud spring-cloud-netflix-hystrix-dashboard org.springframework.cloud spring-cloud-netflix-hystrix-dashboard 2.2.2.RELEASE

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      jquery版本換成2.1.1

      ok,還要加上如下配置

      package com.example.springcloud.hystrix.configuration; import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** *

       * * 
      * *
       * @author mazq * 修改記錄 * 修改后版本: 修改人: 修改日期: 2020/08/04 16:19 修改內(nèi)容: * 
      */ @Configuration public class WebConfiguration { @Bean public ServletRegistrationBean getServlet() { HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet(); ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet); registrationBean.setLoadOnStartup(1); registrationBean.addUrlMappings("/actuator/hystrix.stream"); registrationBean.setName("HystrixMetricsStreamServlet"); return registrationBean; } }

      1

      2

      3

      4

      5

      6

      7

      8

      9

      10

      11

      12

      13

      14

      15

      16

      17

      18

      19

      20

      21

      22

      23

      24

      25

      26

      27

      28

      29

      30

      31

      32

      ok,處理好bug,頁面輸入http://localhost:8082/actuator/hystrix.stream,我們監(jiān)控8082這種微服務(wù)模塊的情況,接口調(diào)用都正常

      ps:頁面輸入http://localhost:8082/actuator/hystrix.stream,delay,title可以不填,Hystrix還支持turbine進(jìn)行集群監(jiān)控,后續(xù)有時(shí)間可以寫博客補(bǔ)充

      附錄:

      ok,本博客參考官方教程進(jìn)行實(shí)踐,僅僅作為入門的學(xué)習(xí)參考資料,詳情可以參考Spring Cloud官方文檔:https://docs.spring.io/spring-cloud-netflix/docs/2.2.x-SNAPSHOT/reference/html/#circuit-breaker-spring-cloud-circuit-breaker-with-hystrix,Hystrix官網(wǎng):https://github.com/Netflix/Hystrix/wiki/How-it-Works

      代碼例子下載:code download

      優(yōu)質(zhì)學(xué)習(xí)資料參考:

      熔斷器 Hystrix 的原理與使用:https://segmentfault.com/a/1190000005988895

      martinfowler.com對(duì)熔斷器的介紹:https://martinfowler.com/bliki/CircuitBreaker.html

      方志鵬大佬系列Spring Cloud博客:https://www.fangzhipeng.com/spring-cloud.html

      使用Spring Cloud與Docker實(shí)戰(zhàn)微服務(wù):https://eacdy.gitbooks.io/spring-cloud-book/content/

      程序員DD大佬系列Spring Cloud博客:http://blog.didispace.com/spring-cloud-learning/

      Spring Cloud 任務(wù)調(diào)度

      版權(quán)聲明:本文內(nèi)容由網(wǎng)絡(luò)用戶投稿,版權(quán)歸原作者所有,本站不擁有其著作權(quán),亦不承擔(dān)相應(yīng)法律責(zé)任。如果您發(fā)現(xiàn)本站中有涉嫌抄襲或描述失實(shí)的內(nèi)容,請(qǐng)聯(lián)系我們jiasou666@gmail.com 處理,核實(shí)后本網(wǎng)站將在24小時(shí)內(nèi)刪除侵權(quán)內(nèi)容。

      上一篇:性能工具之調(diào)試工具 GDB(你以為性能分析中用不到嗎?)
      下一篇:第八屆藍(lán)橋杯省賽JavaC組真題——詳細(xì)答案對(duì)照(完整版)
      相關(guān)文章
      亚洲精品成人久久| 亚洲人成无码www久久久| 亚洲午夜福利精品无码| 日本亚洲色大成网站www久久| 78成人精品电影在线播放日韩精品电影一区亚洲 | 亚洲福利在线播放| 日韩精品电影一区亚洲| 精品亚洲福利一区二区| 亚洲成在人线在线播放无码| 亚洲精品自偷自拍无码| MM1313亚洲精品无码久久| 亚洲a∨无码精品色午夜| 亚洲AV成人无码网站| 亚洲成熟丰满熟妇高潮XXXXX| 亚洲国产成人久久精品大牛影视| 亚洲国产成人AV在线播放| 亚洲av永久中文无码精品综合 | 亚洲AV色欲色欲WWW| 久久精品国产亚洲av瑜伽| 国产精品亚洲一区二区无码 | 亚洲日韩在线观看| 中文字幕亚洲天堂| 久久噜噜噜久久亚洲va久| 亚洲国产精久久久久久久 | 亚洲国产精品不卡毛片a在线| 亚洲 无码 在线 专区| 亚洲一级特黄大片在线观看| 亚洲男人第一无码aⅴ网站| 在线亚洲人成电影网站色www| 久久精品国产精品亚洲精品| 亚洲三级电影网址| 亚洲国语在线视频手机在线| 国产亚洲精品bv在线观看| MM1313亚洲国产精品| 亚洲熟伦熟女新五十路熟妇 | 国产亚洲精品高清在线| 亚洲av无码一区二区乱子伦as| 亚洲一区二区三区电影| 亚洲一级毛片免费看| 亚洲熟女乱色一区二区三区| 国产亚洲精品2021自在线|