<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      Fork me on GitHub

      SpringCloud系列之服務(wù)容錯(cuò)保護(hù)Netflix Hystrix

      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ù)對象,對故障監(jiān)控。失敗達(dá)到一定閾值后,斷路器工作,接口調(diào)用返回一個(gè)錯(cuò)誤,以達(dá)到保護(hù)系統(tǒng),預(yù)防線程資源被大量占用,造成系統(tǒng)雪崩的情況

      引用https://martinfowler.com/bliki/CircuitBreaker.html的圖例,如圖給出了一個(gè)簡單的軟件中的熔斷器模式設(shè)計(jì)方案:
      在這里插入圖片描述

      服務(wù)的健康狀況 = 請求失敗數(shù) / 請求總數(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)打開后,所有請求都會(huì)被攔截,過一段時(shí)間后,開關(guān)狀態(tài)變?yōu)榘腴_(half open)
      • 熔斷器半開(half open)狀態(tài)是允許一個(gè)請求通過的,當(dāng)該請求調(diào)用成功時(shí), 熔斷器恢復(fù)到關(guān)閉狀態(tài).,若該請求失敗, 熔斷器繼續(xù)保持打開狀態(tài)

      3. 什么是Netflix Hystrix?

      Hystrix 是由 Netflix 發(fā)布的針對微服務(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ù),停止在級聯(lián)故障,并提供后備選項(xiàng),所有這些改善您的系統(tǒng)的整體彈性。

      4、Hystrix的工作原理

      引用官網(wǎng)wiki的圖片,簡單介紹Hystrix的工作原理,點(diǎn)此查看大圖
      在這里插入圖片描述
      Hystrix的工作過程:

      1. 構(gòu)造一個(gè)HystrixCommand或HystrixObservableCommand對象
      2. 執(zhí)行命令
      3. 響應(yīng)是否已緩存?
      4. 電路開路了嗎?
      5. 線程池隊(duì)列/信號量是否已滿?
      6. HystrixObservableCommand.construct() 或者 HystrixCommand.run()
      7. 計(jì)算電路健康
      8. 獲取后備
      9. 返回成功的回應(yīng)
      • 1、構(gòu)造一個(gè)HystrixCommand或HystrixObservableCommand對象

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

      • 2、執(zhí)行命令
        Hystrix執(zhí)行命令有如下4種方法:
        ps:前兩種僅適用于簡單HystrixCommand對象,不適用于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<K>     fValue  = command.queue();
      Observable<K> ohValue = command.observe();         //hot observable
      Observable<K> ocValue = command.toObservable();    //cold observable
      
      • 3、響應(yīng)是否已緩存?
        判斷當(dā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ì)列/信號量是否已滿?
        Hystrix的隔離模式有兩種:

        • 線程池隊(duì)列模式
        • 信號量模式
          如果是線程池隔離模式,會(huì)判斷線程池隊(duì)列的容量,如果是信號量隔離模式,會(huì)判斷信號量的值,如果線程池和信號量都已經(jīng)滿了,那么同樣請求不會(huì)再執(zhí)行,會(huì)直接跳到第 8 步(fallback過程),如果未滿那么繼續(xù)執(zhí)行
      • 6、HystrixObservableCommand.construct() 或者 HystrixCommand.run()
        在這里,Hystrix通過如下方法調(diào)用對依賴項(xiàng)的請求,有兩種方法,其中一種執(zhí)行:

        • HystrixCommand.run():返回一個(gè)響應(yīng)或者拋出一個(gè)異常   
        • HystrixObservableCommand.construct():返回一個(gè)可觀測的,發(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ì)將隨后的所有請求短路,直到經(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ì)列或信號量為最大容量(5.),或者命令已超過其超時(shí)長度。

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

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

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

      • 封裝請求
        Hystrix封裝請求由 HystrixCommand 或者 HystrixObservableCommand 類實(shí)現(xiàn),將請求包裝到 Command 對象中,接著執(zhí)行,主要4種方法
      K             value   = command.execute();
      Future<K>     fValue  = command.queue();
      Observable<K> ohValue = command.observe();         //hot observable
      Observable<K> ocValue = command.toObservable();    //cold observable
      
      • 資源隔離
        資源隔離減少風(fēng)險(xiǎn)的方式被稱為:Bulkheads(艙壁隔離模式)

      引用https://segmentfault.com/a/1190000005988895的圖例:
      在這里插入圖片描述
      在Hystrix軟件設(shè)計(jì)中也是基于這種設(shè)計(jì)理念,艙壁隔離模式。Hystrix的隔離模式有兩種: 線程池隊(duì)列模式、信號量模式

      • 熔斷器模式
        Hystrix采用了熔斷器模式,相當(dāng)于電路中的保險(xiǎn)絲,系統(tǒng)出現(xiàn)緊急問題,立刻禁止所有請求,已達(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)這種場景,可以將多個(gè)請求折疊到單個(gè)后端依賴項(xiàng)調(diào)用

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

      • 請求緩存
        HystrixCommand和HystrixObservableCommand實(shí)現(xiàn)可以定義一個(gè)緩存鍵然后請求中用于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的情況,需要自己單獨(dú)添加Hystrix在這里插入圖片描述

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

       <dependency>
                  <groupId>com.netflix.hystrix</groupId>
                  <artifactId>hystrix-javanica</artifactId>
                  <version>RELEASE</version>
              </dependency>
      

      本博客的是基于spring-cloud-starter-netflix-eureka-client進(jìn)行試驗(yàn),試驗(yàn)前要運(yùn)行eureka服務(wù)端,eureka服務(wù)提供者,代碼請參考上一章博客
      在這里插入圖片描述
      加上@EnableCircuitBreaker支持服務(wù)降級

      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);
          }
      
      }
      
      

      新建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ù)注冊
          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
      

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

      User.java:

      package com.example.springcloud.hystrix.bean;
      
      import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
      import lombok.Data;
      
      import java.io.Serializable;
      
      /**
       * <pre>
       *  User
       * </pre>
       *
       * <pre>
       * @author mazq
       * 修改記錄
       *    修改后版本:     修改人:  修改日期: 2020/07/27 17:38  修改內(nèi)容:
       * </pre>
       */
      @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 + '\'' +
                      '}';
          }
      }
      

      @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;
      
      /**
       * <pre>
       *      RestController
       * </pre>
       *
       * <pre>
       * @author mazq
       * 修改記錄
       *    修改后版本:     修改人:  修改日期: 2020/08/01 16:59  修改內(nèi)容:
       * </pre>
       */
      @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;
          }
      
      }
      

      在這里插入圖片描述
      在這里插入圖片描述

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

      pom配置:

      <dependency>
                  <groupId>org.springframework.cloud</groupId>
                  <artifactId>spring-cloud-starter-openfeign</artifactId>
              </dependency>
      

      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);
      }
      

      實(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;
      
      /**
       * <pre>
       *  FeignHystrixClientFallback
       * </pre>
       *
       * <pre>
       * @author mazq
       * 修改記錄
       *    修改后版本:     修改人:  修改日期: 2020/08/03 09:58  修改內(nèi)容:
       * </pre>
       */
      @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;
          }
      }
      
      

      8、Hystrix dashboard監(jiān)控

      Hystrix dashboard提供了對微服務(wù)模塊進(jìn)行監(jiān)控的功能
      在這里插入圖片描述

      在這里插入圖片描述
      maven配置

        <dependency>
          <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
        </dependency>
        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-actuator</artifactId>
         </dependency>
      

      @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í)是對這些數(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配置:

       <dependency>
                  <groupId>org.springframework.cloud</groupId>
                  <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
                  <exclusions>
                      <exclusion>
                          <groupId>org.springframework.cloud</groupId>
                          <artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
              <dependency>
                  <groupId>org.springframework.cloud</groupId>
                  <artifactId>spring-cloud-netflix-hystrix-dashboard</artifactId>
                  <version>2.2.2.RELEASE</version>
              </dependency>
      

      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;
      
      /**
       * <pre>
       *
       * </pre>
       *
       * <pre>
       * @author mazq
       * 修改記錄
       *    修改后版本:     修改人:  修改日期: 2020/08/04 16:19  修改內(nèi)容:
       * </pre>
       */
      @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;
          }
      }
      
      

      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í)資料參考:

      posted @ 2020-08-05 14:01  smileNicky  閱讀(721)  評論(0)    收藏  舉報(bào)
      主站蜘蛛池模板: 亚洲欧美精品一中文字幕| 四虎永久在线精品免费播放 | 亚洲大尺度无码无码专线| 亚洲av影院一区二区三区| 精品国产乱来一区二区三区| 99国产精品欧美一区二区三区| 国产成人高清亚洲一区二区| 中文在线天堂中文在线天堂| 无套内谢少妇高清毛片| 日韩在线视频线观看一区| 精品亚洲综合一区二区三区| 亚洲日本欧洲二区精品| 亚洲AV成人无码精品电影在线 | 中国熟女仑乱hd| 国产亚洲精品久久久久久无亚洲| 国产精品一区二区三区四区| 18禁亚洲一区二区三区| 熟女在线视频一区二区三区| 成人一区二区三区在线午夜| 少妇高潮尖叫黑人激情在线| 激情五月天自拍偷拍视频| 欧美午夜小视频| 亚洲精品久久久久久久久久吃药| 99视频在线精品国自产拍 | 99热门精品一区二区三区无码| 中国女人熟毛茸茸A毛片| 六十路熟妇乱子伦| 日本深夜福利在线观看| 久久国产免费直播| 日韩国产中文字幕精品| 国产在线精品第一区二区| 亚洲aⅴ男人的天堂在线观看| 亚洲av成人网在线观看| 亚洲国产精品久久久天堂麻豆宅男 | 与子乱对白在线播放单亲国产 | 久久久这里只有精品10| 久热这里只有精品视频3| 日本高清中文字幕免费一区二区| 极品美女扒开粉嫩小泬图片 | 国产91丝袜在线播放动漫| 国产羞羞的视频一区二区|