微服务架构 | 5.1 使用 Netflix Hystrix 断路器

本文涉及的产品
服务治理 MSE Sentinel/OpenSergo,Agent数量 不受限
简介: Hystrix 是一个延迟和容灾库,旨在隔离远程系统、服务和第三方库的访问点,停止级联故障,并在故障不可避免的复杂分布式系统中实现弹性;

前言

参考资料
《Spring Microservices in Action》
《Spring Cloud Alibaba 微服务原理与实战》
《B站 尚硅谷 SpringCloud 框架开发教程 周阳》

Hystrix 是一个延迟和容灾库,旨在隔离远程系统、服务和第三方库的访问点,停止级联故障,并在故障不可避免的复杂分布式系统中实现弹性;


1. Hystrix 基础知识

1.1 Hystrix 断路器强调调用

  • Hystrix 断路器没有提供者与消费者的区别,它强调的是服务与资源之间的中间人,如:服务请求数据库与服务内部调用;
  • 因此在服务消费者与服务提供者里,凡是涉及数据库访问与服务间调用都可以使用 Hystrix 断路器;
  • 构建断路器模式、后备模式和舱壁模式的实现需要对线程和线程管理有深入的理解;
  • Netflix 的 Hystrix 库里封装了线程操作,开发人员可以只需要关注业务开发与 Spring Cloud;

1.2 两大类别的 Hystrix 实现

  • 使用 Hystrix 断路器包装所有服务中所有对数据库的调用;
  • 使用 Hystrix 断路器包装所有服务之间的内部服务调用;

两大类别的 Hystrix 实现

1.3 舱壁策略

舱壁策略

1.4 Hystrix 在远程资源调用失败时的决策过程

在远程资源调用失败时使用的决策过程

  • 快照时间窗:查看在 10 s 内发生的调用次数:

    • 请求总数阀值:如果调用次数少于在这个窗口内设置的最小调用次数,那么即使有几个调用失败,Hystrix 也不会采取行动;
    • 反之,进行下一步;
  • 查看整体故障的百分比:

    • 错误百分比阀值:如果故障的总体百分比超过阈值, Hystrix 将触发断路器,使将来几乎所有的调用都失败;
  • 当 Hystrix 断路器被触发时,它将尝试启动一个新的活动窗口:

    • 每隔 5s(可配置的), Hystrix 会通过一个远程调用。 如果调用成功, Hystrix将重置断路器并重新开始让调用通过。 如果调用失败, Hystrix将保持断路器断开;

1.5 当 Hystrix 断路器打开后

  • 再有请求调用的时候,将不会调用主逻辑,而是直接调用降级fallback。通过断路器,实现了自动地发现错误并将降级逻辑切换为主逻辑,减少响应延迟的效果;
  • hystrix 会启动一个休眠时间窗,在这个时间窗内,降级逻辑是临时的成为主逻辑;
  • 当休眠时间窗到期,断路器将进入半开状态,释放一次请求到原来的主逻辑上;

    • 如果此次请求正常返回,那么断路器将继续闭合,主逻辑恢复;
    • 反之,断路器继续进入打开状态,休眠时间窗重新计时;

1.6 Hystrix 的所有配置

在这里插入图片描述
Hystrix 的默认配置

@HystrixCommand(fallbackMethod = "str_fallbackMethod",
        groupKey = "strGroupCommand",
        commandKey = "strCommand",
        threadPoolKey = "strThreadPool",

        commandProperties = {
                // 设置隔离策略,THREAD 表示线程池 SEMAPHORE:信号池隔离
                @HystrixProperty(name = "execution.isolation.strategy", value = "THREAD"),
                // 当隔离策略选择信号池隔离的时候,用来设置信号池的大小(最大并发数)
                @HystrixProperty(name = "execution.isolation.semaphore.maxConcurrentRequests", value = "10"),
                // 配置命令执行的超时时间
                @HystrixProperty(name = "execution.isolation.thread.timeoutinMilliseconds", value = "10"),
                // 是否启用超时时间
                @HystrixProperty(name = "execution.timeout.enabled", value = "true"),
                // 执行超时的时候是否中断
                @HystrixProperty(name = "execution.isolation.thread.interruptOnTimeout", value = "true"),
                // 执行被取消的时候是否中断
                @HystrixProperty(name = "execution.isolation.thread.interruptOnCancel", value = "true"),
                // 允许回调方法执行的最大并发数
                @HystrixProperty(name = "fallback.isolation.semaphore.maxConcurrentRequests", value = "10"),
                // 服务降级是否启用,是否执行回调函数
                @HystrixProperty(name = "fallback.enabled", value = "true"),
                // 是否启用断路器
                @HystrixProperty(name = "circuitBreaker.enabled", value = "true"),
                // 该属性用来设置在滚动时间窗中,断路器熔断的最小请求数。例如,默认该值为 20 的时候,
                // 如果滚动时间窗(默认10秒)内仅收到了19个请求, 即使这19个请求都失败了,断路器也不会打开。
                @HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "20"),
                // 该属性用来设置在滚动时间窗中,表示在滚动时间窗中,在请求数量超过
                // circuitBreaker.requestVolumeThreshold 的情况下,如果错误请求数的百分比超过50,
                // 就把断路器设置为 "打开" 状态,否则就设置为 "关闭" 状态。
                @HystrixProperty(name = "circuitBreaker.errorThresholdPercentage", value = "50"),
                // 该属性用来设置当断路器打开之后的休眠时间窗。 休眠时间窗结束之后,
                // 会将断路器置为 "半开" 状态,尝试熔断的请求命令,如果依然失败就将断路器继续设置为 "打开" 状态,
                // 如果成功就设置为 "关闭" 状态。
                @HystrixProperty(name = "circuitBreaker.sleepWindowinMilliseconds", value = "5000"),
                // 断路器强制打开
                @HystrixProperty(name = "circuitBreaker.forceOpen", value = "false"),
                // 断路器强制关闭
                @HystrixProperty(name = "circuitBreaker.forceClosed", value = "false"),
                // 滚动时间窗设置,该时间用于断路器判断健康度时需要收集信息的持续时间
                @HystrixProperty(name = "metrics.rollingStats.timeinMilliseconds", value = "10000"),
                // 该属性用来设置滚动时间窗统计指标信息时划分"桶"的数量,断路器在收集指标信息的时候会根据
                // 设置的时间窗长度拆分成多个 "桶" 来累计各度量值,每个"桶"记录了一段时间内的采集指标。
                // 比如 10 秒内拆分成 10 个"桶"收集这样,所以 timeinMilliseconds 必须能被 numBuckets 整除。否则会抛异常
                @HystrixProperty(name = "metrics.rollingStats.numBuckets", value = "10"),
                // 该属性用来设置对命令执行的延迟是否使用百分位数来跟踪和计算。如果设置为 false, 那么所有的概要统计都将返回 -1。
                @HystrixProperty(name = "metrics.rollingPercentile.enabled", value = "false"),
                // 该属性用来设置百分位统计的滚动窗口的持续时间,单位为毫秒。
                @HystrixProperty(name = "metrics.rollingPercentile.timeInMilliseconds", value = "60000"),
                // 该属性用来设置百分位统计滚动窗口中使用 “ 桶 ”的数量。
                @HystrixProperty(name = "metrics.rollingPercentile.numBuckets", value = "60000"),
                // 该属性用来设置在执行过程中每个 “桶” 中保留的最大执行次数。如果在滚动时间窗内发生超过该设定值的执行次数,
                // 就从最初的位置开始重写。例如,将该值设置为100, 滚动窗口为10秒,若在10秒内一个 “桶 ”中发生了500次执行,
                // 那么该 “桶” 中只保留 最后的100次执行的统计。另外,增加该值的大小将会增加内存量的消耗,并增加排序百分位数所需的计算时间。
                @HystrixProperty(name = "metrics.rollingPercentile.bucketSize", value = "100"),
                // 该属性用来设置采集影响断路器状态的健康快照(请求的成功、 错误百分比)的间隔等待时间。
                @HystrixProperty(name = "metrics.healthSnapshot.intervalinMilliseconds", value = "500"),
                // 是否开启请求缓存
                @HystrixProperty(name = "requestCache.enabled", value = "true"),
                // HystrixCommand的执行和事件是否打印日志到 HystrixRequestLog 中
                @HystrixProperty(name = "requestLog.enabled", value = "true"),
        },
        threadPoolProperties = {
                // 该参数用来设置执行命令线程池的核心线程数,该值也就是命令执行的最大并发量
                @HystrixProperty(name = "coreSize", value = "10"),
                // 该参数用来设置线程池的最大队列大小。当设置为 -1 时,线程池将使用 SynchronousQueue 实现的队列,
                // 否则将使用 LinkedBlockingQueue 实现的队列。
                @HystrixProperty(name = "maxQueueSize", value = "-1"),
                // 该参数用来为队列设置拒绝阈值。 通过该参数, 即使队列没有达到最大值也能拒绝请求。
                // 该参数主要是对 LinkedBlockingQueue 队列的补充,因为 LinkedBlockingQueue
                // 队列不能动态修改它的对象大小,而通过该属性就可以调整拒绝请求的队列大小了。
                @HystrixProperty(name = "queueSizeRejectionThreshold", value = "5"),
        }
)


2. 对服务使用 Hystrix 断路器

2.1 引入 pom.xml 依赖

<!--拉取 Spring Cloud Hystrix 依赖项-->
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
  • 以下依赖是核心 Netflix Hystrix 库,一般情况下不需要我们引入;
<dependency>
    <groupId>com.netflix.hystrix</groupId>
    <artifactId>hystrix-javanica</artifactId>
    <version>1.5.9</version>
</dependency>

2.2 修改 bootstrap.yml 配置文件

  • 如果需要用到 Feign 调用才需要进行配置;
feign: 
  hystrix:
    #开启feign的hystrix支持,默认是false 
    enabled: true

2.3 在主程序类上标注注解

  • @EnableCircuitBreaker:表示激活使用服务降级相关策略;
  • @EnableHystrix:继承了@EnableCircuitBreaker,并对其进行了在封装;
  • 如果忘记将该注解添加到主程序类中,那么 Hystrix 断路器不会处于活动状态。在服务启动时,也不会收到任何警告或错误消息;

2.4 在业务类上使用 @HystrixCommand 注解(断路器模式)

在 service 包下的业务类里;方法级注解;
@HystrixCommand
private Xxx getXxx(String xxxId) {
    return xxxService.getXxx(xxxId);
}
  • @HystrixCommand 注解将动态生成一个代理,该代理将包装该方法,并通过专门用于处理远程调用的线程池来管理对该方法的所有调用;
  • 当调用时间超过 1000 ms 时,断路器将中断对 getXxx()。并抛出r如下异常:

    • com.nextflix.hystrix.exception.HystrixRuntimeException;

2.5 定制断路器(后备策略、舱壁策略)

  • 默认情况下,不带属性配置的 @HystrixCommand 注解,会将所有远程服务调用都放在同一线程池下。可能会导致应用程序中出现问题;
@HystrixCommand(
        fallbackMethod="getYyy",  //【可选】舱壁策略,定义线程池的唯一名称后备策略,如果 getXxx 调用失败,那么就会调用该方法。注意两个方法参数需保持一致
        threadPoolKey="xxxThreadPool",  //【可选】舱壁策略,定义线程池的唯一名称舱壁策略,定义线程池的唯一名称
        threadPoolProperties={
                @HystrixProperty(name="coreSize",value="30"),  //线程池中线程的最大数量
                @HystrixProperty(name="maxQueueSize", value="10")  //定义一个位于线程池前的队列,对传入的请求进行排队
        },
        //通过 commandProperties 属性来定制断路器的行为
        commandProperties={
                @HystrixProperty(name="circuitBreaker.requestVolumeThreshold", value="10"),  //断路器触发前 10s 内需要发生的连续调用数量
                @HystrixProperty(name="circuitBreaker.errorThresholdPercentage", value="75"),  //在断路器跳闸之前必须达到的调用失败百分比
                @HystrixProperty(name="circuitBreaker.sleepWindowInMilliseconds", value="7000"),  //断路器跳闸之后, Hystrix 允许一个调用通过以便查看服务是否恢复健康之前 Hystrix 的休眠时间 
                
                @HystrixProperty(name="metrics.rollingStats.timeInMilliseconds", value="15000"),  //Hystr ix 用来监视服务调用问题的窗口大小,其默认值为 10 000ms
                @HystrixProperty(name="metrics.rollingStats.numBuckets", value="5"),  //定义的滚动窗口中收集统计信息的次数
                
                //@HystrixProperty(name="execution.isolation.thread.timeoutInMilliseconds",value="5000"), //设置断路器超时时间
                @HystrixProperty(name="execution.isolation.strategy", value="SEMAPHORE"),  //修改命令池的隔离设置
        }
)
private Xxx getXxx(String xxxId) {
    return xxxService.getXxx(xxxId);
}

private Yyy getYyy(String yyyId) {
    return yyyService.getYyy(yyyId);
}

属性详解

  • threadPoolProperties

    • maxQueueSize:如果将其值设置为 -1,则将使用 Java SynchronousQueue 来保存所有传人的请求。同步队列本质上会强制要求正在处理中的请求数量永远不能超过线程池中可用线程的数量;
    • maxQueueSize:设置为大于 1 的值将使用 Java LinkedBlockingQueue;LinkedBlockingQueue 的使用允许开发人员即使所有线程都在忙于处理请求,也能对请求进行排队;
    • maxQueueSize 属性只能在线程池首次初始化时设置(例如,在应用程序启动时)。Hystrix 允许通过使用 queueSizeRejectionThreshold 属性来动态更改队列的大小,但只有在 maxQueueSize 属性的值大于 0 时,才能设置此属性;
  • commandProperties

    • execution.isolation.thread.timeoutInMilliseconds:设置断路器超时时间。在实际开发中应该把问题放在解决性能问题而不是增加默认超时。如果确实遇到一些比其他服务调用需要更长时间的服务调用,务必将这些服务调用隔离到单独的线程池中;
    • metrics.rollingStats.numBuckets:其值需要被 metrics.rollingStats.timeInMilliseconds 整除。上例 Hystrix 使用 15s 的窗口,并将统计数据收集到长度为 3 s 的 5 个桶中。查的统计窗口越小且在窗口中保留的桶的数量越多,就越会加剧高请求服务的 CPU 利用率和内存使用率;
    • execution.isolation.strategy:断路器执行时,有两种不同的隔离策略;

      • THREAD(线程):默认,保护调用的每个 Hystrix命令都在一个单独的线程池中运行;
      • SEMAPHORE(信号量):轻量级隔离,适用于服务量很大且正在使用异步 l/O 编程模型(假设使用的是像 Netty 这样的异步 IO 容器)运行的情况;
  • 其他配置属性详情请见本篇《1.6 Hystrix 的所有配置》;

2.6 使用类级注解统一 Hystrix 配置

  • @DefaultProperties:相当于修改该类下 Hystrix 配置的默认值;
@DefaultProperties( 
    commandProperties={
         @HystrixProperty(name="execution.isolation.thread.timeoutInMilliseconds",value="10000")}
class  MyService{
    ...
}


3. 使用 HystrixConcurrencyStrategy 联系线程上下文

3.1 Hystrix 的上下文隔离

  • 默认情况下, Hystrix 以 THREAD 隔离策略运行;
  • 这使每个 Hystrix 命令都在一个单独的线程池中运行,该线程池不与父钱程共享它的上下文;
  • 因此默认情况下,对被父线程调用并由 @HystrixComman 保护的方法而言,在父线程中设置为 ThreadLocal 值的值都是不可用的;
  • 解决方法:定义一种并发策略,能将附加的父线程上下文注入由 由 Hystrix 命令管理的线程中;

3.2 自定义 Hystrix 井发策略类

//扩展基本的 Hystrix ConcurrencyStrategy 类
public class ThreadLocalAwareStrategy extends HystrixConcurrencyStrategy{
    private HystrixConcurrencyStrategy existingConcurrencyStrategy;

    //将已存在的并发策略传入到构造器中
    public ThreadLocalAwareStrategy(HystrixConcurrencyStrategy existingConcurrencyStrategy) {
        this.existingConcurrencyStrategy = existingConcurrencyStrategy;
    }

    @Override
    public BlockingQueue<Runnable> getBlockingQueue(int maxQueueSize) {
        return existingConcurrencyStrategy != null
                ? existingConcurrencyStrategy.getBlockingQueue(maxQueueSize)
                : super.getBlockingQueue(maxQueueSize);
    }

    @Override
    public <T> HystrixRequestVariable<T> getRequestVariable(
            HystrixRequestVariableLifecycle<T> rv) {
        return existingConcurrencyStrategy != null
                ? existingConcurrencyStrategy.getRequestVariable(rv)
                : super.getRequestVariable(rv);
    }

    @Override
    public ThreadPoolExecutor getThreadPool(HystrixThreadPoolKey threadPoolKey,
                                            HystrixProperty<Integer> corePoolSize,
                                            HystrixProperty<Integer> maximumPoolSize,
                                            HystrixProperty<Integer> keepAliveTime, TimeUnit unit,
                                            BlockingQueue<Runnable> workQueue) {
        return existingConcurrencyStrategy != null
                ? existingConcurrencyStrategy.getThreadPool(threadPoolKey, corePoolSize,
                maximumPoolSize, keepAliveTime, unit, workQueue)
                : super.getThreadPool(threadPoolKey, corePoolSize, maximumPoolSize,
                keepAliveTime, unit, workQueue);
    }

    @Override
    public <T> Callable<T> wrapCallable(Callable<T> callable) {
         //注入 Callable 实现,用来设置 UserContext
        return existingConcurrencyStrategy != null
                ? existingConcurrencyStrategy
                .wrapCallable(new DelegatingUserContextCallable<T>(callable, UserContextHolder.getContext()))
                : super.wrapCallable(new DelegatingUserContextCallable<T>(callable, UserContextHolder.getContext()));
    }
}

3.3 定义一个 Java Callable 类,将 UserContext 注入 Hystrix 命令中

public final class DelegatingUserContextCallable<V> implements Callable<V> {
    private final Callable<V> delegate;
    private UserContext originalUserContext;
    //传递原始 Callable 类,自定义 Callable 将调用 Hystrix 保护的代码与来自父线程的 UserContext
    public DelegatingUserContextCallable(Callable<V> delegate,
                                             UserContext userContext) {
        this.delegate = delegate;
        this.originalUserContext = userContext;
    }
    //call() 方法在被 @HystrixCommand 注解保护的方法之前调用
    public V call() throws Exception {
        //已设置 UserContext,存储 UserContext 的 ThreadLocal 变量与运行受 Hystrix 保护的方法的线程相关联
        UserContextHolder.setContext( originalUserContext );

        try {
            //在 Hystrix 保护的方法上调用 call() 方法
            return delegate.call();
        }
        finally {
            this.originalUserContext = null;
        }
    }

    public static <V> Callable<V> create(Callable<V> delegate,
                                         UserContext userContext) {
        return new DelegatingUserContextCallable<V>(delegate, userContext);
    }
}

3.4 配置 Spring Cloud 以使用自定义 Hystrix 井发策略

@Configuration
public class ThreadLocalConfiguration {
        //当构造配置对象时,它将自动装配在现有的 HystrixConcurrencyStrategy 中
        @Autowired(required = false)
        private HystrixConcurrencyStrategy existingConcurrencyStrategy;

        @PostConstruct
        public void init() {
            // 保留现有的 Hystrix 插件的引用
            //因为要注册一个新的并发策略,所以要获取所有其他的 Hystrix 组件,然后重新设置 Hystrix 组件
            HystrixEventNotifier eventNotifier = HystrixPlugins.getInstance()
                    .getEventNotifier();
            HystrixMetricsPublisher metricsPublisher = HystrixPlugins.getInstance()
                    .getMetricsPublisher();
            HystrixPropertiesStrategy propertiesStrategy = HystrixPlugins.getInstance()
                    .getPropertiesStrategy();
            HystrixCommandExecutionHook commandExecutionHook = HystrixPlugins.getInstance()
                    .getCommandExecutionHook();

            HystrixPlugins.reset();

            //使用 Hystrix 插件注册自定义的 Hystrix 并发策略(ThreadConcurrency Strategy)
            HystrixPlugins.getInstance().registerConcurrencyStrategy(new ThreadLocalAwareStrategy(existingConcurrencyStrategy));
            //重新注册 Hystrix 插件使用的所有组件
            HystrixPlugins.getInstance().registerEventNotifier(eventNotifier);
            HystrixPlugins.getInstance().registerMetricsPublisher(metricsPublisher);
            HystrixPlugins.getInstance().registerPropertiesStrategy(propertiesStrategy);
            HystrixPlugins.getInstance().registerCommandExecutionHook(commandExecutionHook);
        }
}

4. 使用 hystrixDashboard 实现服务监控

  • Hystrix 提供了准实时的调用监控(Hystrix Dashboard),其会持续地记录所有通过Hystrix发起的请求的执行信息,并以统计报表和图形的形式展示给用户,包括每秒执行多少请求多少成功,多少失败等;
  • Netflix通过 hystrix-metrics-event-stream 项目实现了对以上指标的监控;
  • Spring Cloud 也提供了 Hystrix Dashboard 的整合,对监控内容转化成可视化界面;

4.1 引入 pom.xml 依赖

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

4.2 修改 application.yml 配置文件

主要是修改端口号;
server:
  port: 9001

4.3 在主程序类上标注注解

@EnableHystrixDashboard:表名启用 Hystrix Dashboard 对调用进行监控;

4.4 配置被监控的服务

1. 添加 pom.xml 依赖文件

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

2. 在主启动类中指定监控路径

@SpringBootApplication
@EnableEurekaClient //本服务启动后会自动注册进eureka服务中
@EnableCircuitBreaker//对hystrixR熔断机制的支持
public class Application{
    public static void main(String[] args){
        SpringApplication.run(Application.class,args);
    }

/**
 *此配置是为了服务监控而配置,与服务容错本身无关,springcloud升级后的坑
 *ServletRegistrationBean因为springboot的默认路径不是"/hystrix.stream",
 *只要在自己的项目里配置上下面的servlet就可以了
 */
@Bean
public ServletRegistrationBean getServlet() {
    HystrixMetricsStreamServlet streamServlet = new HystrixMetricsStreamServlet();
    ServletRegistrationBean registrationBean = new ServletRegistrationBean(streamServlet);
    registrationBean.setLoadOnStartup(1);
    registrationBean.addUrlMappings("/hystrix.stream");
    registrationBean.setName("HystrixMetricsStreamServlet");
    return registrationBean;
}

4.5 访问图形化界面

Hystrix 图形化界面

4.6 查看监控图

  • 监控图示例:

监控图示例

  • 监控图图例解释:

监控图图例解释1
监控图图例解释2

  • 实心圈:有两种含义:

    • 通过颜色的变化代表了实例的健康程度,它的健康度从:绿色 < 黄色 < 橙色 < 红色 递减;
    • 其大小也会根据实例的请求流量发生变化,流量越大该实心圆就越大;
    • 所以通过该实心圆的展示,就可以在大量的实例中快速的发现故障实例和高压力实例;
  • 曲线

    • 用来记录2分钟内流量的相对变化,可以通过它来观察到流量的上升和下降趋势;



相关文章
|
6月前
|
Cloud Native Go 微服务
golang 微服务中的断路器 hystrix
golang 微服务中的断路器 hystrix
|
6月前
|
缓存 运维 监控
微服务技术系列教程(22) - SpringCloud- 服务保护机制Hystrix
微服务技术系列教程(22) - SpringCloud- 服务保护机制Hystrix
60 0
|
2月前
|
SpringCloudAlibaba Java 测试技术
【Springcloud Alibaba微服务分布式架构 | Spring Cloud】之学习笔记(六)Hystrix(豪猪哥)的使用
【Springcloud Alibaba微服务分布式架构 | Spring Cloud】之学习笔记(六)Hystrix(豪猪哥)的使用
43 1
|
5月前
|
监控 负载均衡 数据可视化
SpringCloud - Hystrix断路器-服务熔断与降级和HystrixDashboard
SpringCloud - Hystrix断路器-服务熔断与降级和HystrixDashboard
29 0
|
6月前
|
Cloud Native 测试技术 Go
golang 微服务中的断路器 hystrix 小案例
golang 微服务中的断路器 hystrix 小案例
|
7月前
|
监控 Java 微服务
16SpringCloud - 断路器项目示例(Hystrix Dashboard)
16SpringCloud - 断路器项目示例(Hystrix Dashboard)
24 0
|
7月前
|
Java Spring
15SpringCloud - 断路器项目示例(Feign Hystrix)
15SpringCloud - 断路器项目示例(Feign Hystrix)
19 0
|
7月前
|
监控 Java
14SpringCloud - 断路器项目示例(Ribbon Hystrix)
14SpringCloud - 断路器项目示例(Ribbon Hystrix)
23 0
|
7月前
|
监控 API 开发者
13SpringCloud - 断路器(Hystrix)
13SpringCloud - 断路器(Hystrix)
26 0
|
7月前
|
缓存 监控 Java
12SpringCloud - 断路器(Hystrix)引入
12SpringCloud - 断路器(Hystrix)引入
29 0