Rubin's Blog

  • 首页
  • 关于作者
  • 隐私政策
享受恬静与美好~~~
分享生活的点点滴滴~~~
  1. 首页
  2. SpringCloud
  3. 正文

SpringCloud Netflix之Hystrix熔断器

2021年 10月 22日 749点热度 1人点赞 0条评论

微服务中的雪崩效应

什么是微服务中的雪崩效应呢

在微服务架构中,一个应用可能会由多个微服务组成,微服务之间的数据交互通过远程调用完成。这就带来了一个问题:假设微服务A调用微服务B和微服务C,微服务B和微服务C又调用其他微服务,这就是所谓的“扇出”。如果扇出的链路上某个微服务的调用响应时间过长或者不可用,对微服务A的调用就会占用越来越多的系统资源,进而引起系统崩溃,这就是所谓的“雪崩效应”。

雪崩效应的解决方案

从可用性、可靠性两方面来讲,为防止系统的整体缓慢甚至崩溃,采用的技术手段主要有以下三种。

服务熔断

熔断机制是应对雪崩效应的一种微服务链路保护机制。我们在各种场景下都会接触到熔断这两个字。高压电路中,如果某个地方的电压过高,熔断器就会熔断,对电路进行保护。股票交易中,如过股票指数过高,也会采用熔断机制,暂停股票的交易。

同样的,在微服务架构中,熔断机制也是起着类似的作用。当扇出链路的某个微服务不可用或者响应时间太长时,熔断该节点微服务的调用,进行服务的降级,快速返回错误的响应信息。当检测到该节点微服务调用响应正常后,恢复调用链路。

服务降级

通俗讲就是整体资源不够用了,先将一些不关紧的服务停掉(调用我的时候,给你返回一个预留的值,也叫做兜底数据),待渡过难关之后,再把那些服务打开。

服务降级一般是从整体考虑。就是当某个服务熔断之后,服务器将不再被调用,此刻客户端可以自己准备一个本地的fallback回调,返回一个缺省值。这样做,虽然服务水平下降,但是好歹可用,比直接挂掉要好很多。

服务限流

服务限流是当服务出问题或影响到核心流程性能时,暂时将服务屏蔽掉,待高峰或者问题解决之后再打开。但是有些场景并不能用服务降级来解决,比如秒杀业务这样的核心功能,这个时候就可以结合服务限流来限制这些场景的并发/请求量。

限流措施也很多,主要有以下几种形式:

  • 限制总并发数(比如数据库连接池、线程池)
  • 限制瞬时并发数(如Nginx限制瞬时并发连接数)
  • 限制时间窗口的平均速率(如Guava的RateLimiter、Nginx的limit_req模块,限制每秒的平均速率)
  • 限制远程接口调用速率、限制MQ的消费速率等等

Hystrix简介

Hystrix是由Netflix开源的一个延迟和容错库,用于隔离访问远程系统、服务或第三方库,防止级联失败,从而提升系统的可用性与容错性。Hystrix主要通过以下几点实现延迟和容错。

  • 包裹请求:使用HystrixCommand包裹对依赖的调用逻辑
  • 跳闸机制:当某个微服务的错误率超过一定的阀值时,Hystrix可以跳闸,停止请求该服务一段时间
  • 资源隔离:Hystrix为每个依赖都维护了一个小型的线程池(舱壁模式)(或者信号量)。如果该线程池已满,发往该依赖的请求就被立即拒绝,而不是排队等待,从而加速失败判定
  • 监控:Hystrix可以近乎实时的监控运行指标和配置的变化,例如成功、失败、超时以及被拒绝的请求等
  • 回退机制:当请求失败、超时、被拒绝或者断路器打开时,执行回退逻辑。回退逻辑是由开发人员自行提供的,例如返回一个缺省值等等
  • 自我修复:断路器打开一段时间后,会自动进入“半开”状态,如果此时被调用服务正常返回,则自动关闭断路器

Hystrix熔断应用

我们要在服务消费者中添加如下依赖:

<!--熔断器Hystrix-->
<dependency>
     <groupId>org.springframework.cloud</groupId>
     <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>

启动类添加@EnableCircuitBreaker开启熔断。

在业务处理类改造如下:

package com.rubin.scn.service.autodeliver.controller;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import com.rubin.scn.common.entity.RResume;
import com.rubin.scn.service.autodeliver.feign.IResumeClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("auto-deliver")
public class AutoDeliverController {

    @Autowired
    private RestTemplate restTemplate;

    @Autowired
    private DiscoveryClient discoveryClient;


    @GetMapping("service/{id}")
    public List<ServiceInstance> getServiceInfos(@PathVariable("id") String id) {
        return discoveryClient.getInstances(id);
    }

    @GetMapping("resumes")
    public List getResumes() {
        List result = restTemplate.getForObject("http://scn-service-resume/resume/list", List.class);
        return result;
    }

    @GetMapping("hello")
    public String hello() throws InterruptedException {
        return restTemplate.getForObject("http://scn-service-resume/resume/hello", String.class);
    }

    // 使用@HystrixCommand注解进行熔断控制
    @HystrixCommand(
            // 线程池标识,要保持唯一,不唯一的话就公用了
            threadPoolKey = "timeout",
            // 线程池细节属性配置
            threadPoolProperties = {
                    @HystrixProperty(name = "coreSize", value = "1"), // 线程数
                    @HystrixProperty(name = "maxQueueSize", value = "20") // 等待队列长度
            },
            // commandProperties熔断的⼀些细节属性配置
            commandProperties = {
                    @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "1000"),
                    // 统计时间窗口长度
                    @HystrixProperty(name = "metrics.rollingStats.timeInMilliseconds", value = "8000"),
                    // 统计时间窗口内的最小请求数
                    @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "2"),
                    // 统计时间窗口内的最内的错误数量百分比阀值
                    @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "50"),
                    // 自我修复时的活动窗口长度
                    @HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "3000")
            },
            fallbackMethod = "rubinFallback"
    )
    @GetMapping("timeout")
    public String timeout() {
        return restTemplate.getForObject("http://scn-service-resume/resume/timeout", String.class);
    }

    public String rubinFallback() {
        return "rubin fallback.";
    }


}

上述被 @HystrixCommand 注解标注的方法会自动被HystrixCommand包裹,在方法调用异常、超时或者熔断器打开的时候回自动触发配置的兜底逻辑。兜底逻辑需要注意的是:方法要和被降级的方法在同一个类中并且方法间的方法签名必须相同(相同的参数列表和返回值类型)。

除此之外,我们也可以在类上使用@DefaultProperties注解来统一指定整个类中共用的降级(兜底)方法。

改造完之后,我们发起调用会发现在接口超时时会自动调用我们的降级方法返回我们的缺省值。

Hystrix舱壁模式(线程池隔离策略)

如果不进行任何设置,所有的熔断方法使用一个Hystrix线程池(10个线程),那么这样的话会导致问题,这个问题并不是扇出链路微服务不可用导致的,而是我们的线程机制导致的。如果方法A的请求把十个线程都用了,方法2请求处理的时候压根都没法去访问B,因为没有线程可用,而不是B服务不可用。

为了避免问题服务请求过多导致正常服务无法访问,Hystrix不是采用增加线程数,而是使用单独的为每一个控制方法创建一个线程池的方式来解决,这种模式叫做“舱壁模式”,也是线程隔离的手段。如下图:

具体的线程隔离的使用方式参考上面熔断应用案例。我们使用threadPoolKey来标识一个唯一的线程池。不标识的话默认使用类名创建一个公用线程池,以供本类中所有被HystrixCommand包过的方法公用。

使用命令查看Hystrix的线程情况

想要查看Hystrix的线程情况,我们可以使用jps命令来查看我们的java进程的进程号,再使用jstack 进程号 | grep hystrix命令查看我们的线程使用情况。

Hystrix工作流程与高级应用

Hystrix的工作流程如下图所示:

  1. 当调用出现问题时,开启一个时间窗(10s)
  2. 在这个时间窗口内,统计调用次数是否达到最小请求数?a.如果达到了,则统计失败的请求数占所有请求数的百分比,是否达到阀值?a1.如果达到了,则跳闸(不再请求对应服务)a2.如果没有达到,则重置统计信息,回到第一步
  3. 如果跳闸,则会开启一个活动窗口(默认5s),每隔5s,Hystrix会让一个请求通过去访问问题服务,查看调用情况。如果调用成功,重置断路器会到第1步,如果失败,重复第3步

具体的设置项示例如下:

/**
  * 8秒钟内,请求次数达到2个,并且失败率在50%以上,就跳闸
  * 跳闸后活动窗⼝设置为3s
  */
@HystrixCommand(
    commandProperties = {
        @HystrixProperty(name =
 "metrics.rollingStats.timeInMilliseconds",value = "8000"),
        @HystrixProperty(name =
 "circuitBreaker.requestVolumeThreshold",value = "2"),
        @HystrixProperty(name =
 "circuitBreaker.errorThresholdPercentage",value = "50"),
        @HystrixProperty(name =
 "circuitBreaker.sleepWindowInMilliseconds",value = "3000")
    }
)

也可以在配置文件中指定上述配置:

# 配置熔断策略:
hystrix:
  command:
    default:
      circuitBreaker:
        # 强制打开熔断器,如果该属性设置为true,强制断路器进⼊打开状态,将会拒绝所有的请求。 默认false关闭的
        forceOpen: false
        # 触发熔断错误比例阈值,默认值50%
        errorThresholdPercentage: 50
        # 熔断后休眠时长,默认值5秒
        sleepWindowInMilliseconds: 3000
        # 熔断触发最小请求次数,默认值是20
        requestVolumeThreshold: 2
      execution:
        isolation:
          thread:
            # 熔断超时设置,默认为1秒
            timeoutInMilliseconds: 1000

我们可以基于SpringBoot的健康检查来观察跳闸状态,我们先引入对应依赖(由于我们的spring-cloud-demo父项目已经引入了,这里不用特别引用):

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

再开起我们所有状态检查接口:

# springboot中暴露健康检查等断点接口
management:
  endpoints:
    web:
      exposure:
        include: "*"
  # 暴露健康接口的细节
  endpoint:
    health:
      show-details: always

访问健康检查接口:http://host:port/actuator/health

如果Hystrix是正常工作的状态,则为:

跳闸状态为:

活动窗口自我修复之后为:

Hystrix Dashboard断路监控仪表盘

由上一小节我们可以知道,我们通过访问 /actuator/health 接口是可以获取到监控的文字信息,但是不直观。基于这一点Hystrix官方还提供了基于图形化的DashBoard(仪表盘)监控平台。Hystrix仪表盘可以显示每个断路器的状态。

我们在scn模块下新建模块scn-hystrix-dashboard,pom文件如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>scn</artifactId>
        <groupId>com.rubin</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>scn-hystrix-dashboard</artifactId>

    <dependencies>
        <!--hystrix-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
        </dependency>
        <!--hystrix 仪表盘-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
        </dependency>
        <dependency>
            <groupId>com.rubin</groupId>
            <artifactId>scn-service-common</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>

启动类为:

package com.rubin.scn.hystrix.dashboard;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;

@SpringBootApplication
@EnableDiscoveryClient
@EnableHystrixDashboard
public class HystrixDashboardBootstrap {

    public static void main(String[] args) {
        SpringApplication.run(HystrixDashboardBootstrap.class, args);
    }

}

配置文件为:

server:
  port: 9002
spring:
  application:
    name: scn-hystrix-dashboard
eureka:
  instance:
    hostname: 127.0.0.1
    prefer-ip-address: true
    # 配置中心读取的配置不能解析@。。@来标注的pom文件中的变量,只能写死或者配置在该配置文件中用${}的形式引用
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}:1.0-SNAPSHOT
    # 租约续约间隔时间,默认30秒
    lease-renewal-interval-in-seconds: 30
    # 租约到期,服务时效时间,默认值90秒,服务超过90秒没有发生⼼跳,EurekaServer会将服务从列表移除
    lease-expiration-duration-in-seconds: 90
  client:
    service-url:
      defaultZone: http://eureka-host:8761/eureka/,http://eureka-host:8762/eureka/
    register-with-eureka: true
    # 每隔多久拉取一次服务列表
    registry-fetch-interval-seconds: 30
    fetch-registry: true
    # 配制了该项 回阻止将该实例注册为一个eureka client 默认是true 默认自动加入一个Maker类标记  所以引入eureka-client依赖之后 加不加@EnableEurekaClient都会默认注册进EurekaServer
    # enabled: false

# springboot中暴露健康检查等断点接口
management:
  endpoints:
    web:
      exposure:
        include: "*"
  # 暴露健康接口的细节
  endpoint:
    health:
      show-details: always

在服务消费者的启动类中添加以下代码来注册一个监控的servlet:

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

启动服务之后,我们持续调用被Hystrix包裹的接口,然后访问http://127.0.0.1:9001/actuator/hystrix.stream可以看到数据,但是不直观。

我们启动仪表盘服务,访问http://127.0.0.1:9002/hystrix。在启动页填好我们需要监控的地址 http://127.0.0.1:9001/actuator/hystrix.stream 点击确定,我们就能很直观的看到当前断路器的状态以及统计信息等等。

Hystrix Turbine聚合监控

之前,我们针对的是一个微服务实例的Hystrix数据查询分析,但是在微服务架构下,一个微服务的实例往往是多个(集群化)。按照已有的方法,我们每一个实例都要创建一个仪表盘页面去监控,这种手工做操很繁琐并且不易于综合分析。

上述问题,我们可以用 Hystrix Turbine 来聚合哥哥微服务的各个实例的监控数据,来展示在一个页面上。

我们在scn模块下创建一个新的子模块scn-hystrix-turbine,其pom文件如下:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>scn</artifactId>
        <groupId>com.rubin</groupId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>scn-hystrix-turbine</artifactId>

    <dependencies>
        <!--hystrix turbine聚合监控-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.rubin</groupId>
            <artifactId>scn-service-common</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

</project>

启动类如下:

package com.rubin.scn.hystrix.turbine;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.turbine.EnableTurbine;

@SpringBootApplication
@EnableDiscoveryClient
@EnableTurbine
public class HystrixTurbineBootstrap {

    public static void main(String[] args) {
        SpringApplication.run(HystrixTurbineBootstrap.class, args);
    }

}

配置文件如下:

server:
  port: 9003
spring:
  application:
    name: scn-hystrix-turbine
eureka:
  instance:
    hostname: 127.0.0.1
    prefer-ip-address: true
    # 配置中心读取的配置不能解析@。。@来标注的pom文件中的变量,只能写死或者配置在该配置文件中用${}的形式引用
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}:1.0-SNAPSHOT
    # 租约续约间隔时间,默认30秒
    lease-renewal-interval-in-seconds: 30
    # 租约到期,服务时效时间,默认值90秒,服务超过90秒没有发生⼼跳,EurekaServer会将服务从列表移除
    lease-expiration-duration-in-seconds: 90
  client:
    service-url:
      defaultZone: http://eureka-host:8761/eureka/,http://eureka-host:8762/eureka/
    register-with-eureka: true
    # 每隔多久拉取一次服务列表
    registry-fetch-interval-seconds: 30
    fetch-registry: true
    # 配制了该项 回阻止将该实例注册为一个eureka client 默认是true 默认自动加入一个Maker类标记  所以引入eureka-client依赖之后 加不加@EnableEurekaClient都会默认注册进EurekaServer
    # enabled: false
turbine:
  app-config: scn-service-resume,scn-service-auto-deliver
  cluster-name-expression: "'default'"

# springboot中暴露健康检查等断点接口
management:
  endpoints:
    web:
      exposure:
        include: "*"
  # 暴露健康接口的细节
  endpoint:
    health:
      show-details: always

至此,我们的聚合服务就编写完成了。但是,我们在配置文件中配置类聚合服务消费者和服务提供者的服务,所以我们要改造一下 服务提供者 。

在服务提供者服务中加入以下依赖:

<!--熔断器Hystrix-->
<dependency>
     <groupId>org.springframework.cloud</groupId>
     <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
</dependency>

启动类修改为:

package com.rubin.scn.service.resume;

import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
@MapperScan(basePackages = "com.rubin.scn.service.resume.mapper")
public class ScnServiceResumeBootstrap {

    public static void main(String[] args) {
        SpringApplication.run(ScnServiceResumeBootstrap.class, args);
    }

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

}

配置文件修改为:

server:
  port: 9000
spring:
  application:
    name: scn-service-resume
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/spring_cloud_db?characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true
    username: root
    password: 123456

eureka:
  instance:
    hostname: 127.0.0.1
    prefer-ip-address: true
    # 配置中心读取的配置不能解析@。。@来标注的pom文件中的变量,只能写死或者配置在该配置文件中用${}的形式引用
    instance-id: ${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}:1.0-SNAPSHOT
    # 租约续约间隔时间,默认30秒
    lease-renewal-interval-in-seconds: 30
    # 租约到期,服务时效时间,默认值90秒,服务超过90秒没有发生心跳,EurekaServer会将服务从列表移除
    lease-expiration-duration-in-seconds: 90
  client:
    service-url:
      defaultZone: http://eureka-host:8761/eureka/,http://eureka-host:8762/eureka/
    register-with-eureka: true
    # 每隔多久拉取一次服务列表
    registry-fetch-interval-seconds: 30
    fetch-registry: true
    # 配制了该项 回阻止将该实例注册为一个eureka client 默认是true 默认自动加入一个Maker类标记  所以引入eureka-client依赖之后 加不加@EnableEurekaClient都会默认注册进EurekaServer
    # enabled: false

# 配置熔断策略:
hystrix:
  command:
    default:
      circuitBreaker:
        # 强制打开熔断器,如果该属性设置为true,强制断路器进⼊打开状态,将会拒绝所有的请求。 默认false关闭的
        forceOpen: false
        # 触发熔断错误比例阈值,默认值50%
        errorThresholdPercentage: 50
        # 熔断后休眠时长,默认值5秒
        sleepWindowInMilliseconds: 3000
        # 熔断触发最小请求次数,默认值是20
        requestVolumeThreshold: 2
      execution:
        isolation:
          thread:
            # 熔断超时设置,默认为1秒
            timeoutInMilliseconds: 1000

# springboot中暴露健康检查等断点接口
management:
  endpoints:
    web:
      exposure:
        include: "*"
  # 暴露健康接口的细节
  endpoint:
    health:
      show-details: always

修改完之后,我们依次启动注册机、 服务提供者 、 服务消费者 、聚合服务和仪表盘服务。

启动之后,我们查看http://127.0.0.1:9003/turbine.stream会发现已经有数据了:

我们在仪表盘页面(http://127.0.0.1:9002/hystrix)填写该地址之后,可以看到聚合之后的服务监控:

关于熔断器的内容就到这里了。如果有兴趣的小伙伴可以查看源码来进一步了解底层实现细节。欢迎各位小伙伴积极留言交流~~~

本作品采用 知识共享署名 4.0 国际许可协议 进行许可
标签: SpringCloud
最后更新:2022年 6月 9日

RubinChu

一个快乐的小逗比~~~

打赏 点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复
文章目录
  • 微服务中的雪崩效应
    • 什么是微服务中的雪崩效应呢
    • 雪崩效应的解决方案
      • 服务熔断
      • 服务降级
      • 服务限流
  • Hystrix简介
  • Hystrix熔断应用
    • Hystrix舱壁模式(线程池隔离策略)
    • 使用命令查看Hystrix的线程情况
  • Hystrix工作流程与高级应用
  • Hystrix Dashboard断路监控仪表盘
  • Hystrix Turbine聚合监控
最新 热点 随机
最新 热点 随机
问题记录之Chrome设置屏蔽Https禁止调用Http行为 问题记录之Mac设置软链接 问题记录之JDK8连接MySQL数据库失败 面试系列之自我介绍 面试总结 算法思维
Dubbo之应用案例 Tomcat之系统架构 面试总结 JVM常用指令与可视化调优工具 MyBatis之MyBatis-Plus详解 SpringCloud Netflix之Hystrix熔断器

COPYRIGHT © 2021 rubinchu.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

京ICP备19039146号-1