hystrix
银真
这个作者很懒,什么都没留下…
展开
-
【Hystrix】【03】Hystrix-Turbine的使用
官网https://cloud.spring.io/spring-cloud-static/Dalston.SR5/multi/multi__hystrix_timeouts_and_ribbon_clients.html1.概述Looking at an individual instances Hystrix data is not very useful in terms of the overall health of the system.Turbine is an application原创 2020-11-11 20:19:47 · 623 阅读 · 1 评论 -
【Hystrix】【02】Hystrix-Dashboard的使用
1.官网https://cloud.spring.io/spring-cloud-static/Dalston.SR5/multi/multi__hystrix_timeouts_and_ribbon_clients.html2.使用To include the Hystrix Dashboard in your project use the starter with group org.springframework.cloud and artifact id spring-cloud-start原创 2020-11-10 21:20:02 · 106 阅读 · 1 评论 -
【Hystrix】【06】maxQueueSize Rejected command because thread-pool queueSize is at rejection threshold.
1.异常java.util.concurrent.RejectedExecutionException: Rejected command because thread-pool queueSize is at rejection threshold. at com.netflix.hystrix.strategy.concurrency.HystrixContextScheduler$HystrixContextSchedulerWorker.schedule(HystrixContextSchedu原创 2020-11-06 11:13:14 · 703 阅读 · 0 评论 -
【Hystrix】【05】测试hystrix降级
降级有三种清空1.下游服务宕机2.下游服务抛出异常3.下游服务超时可以代码控制超时和异常测试,如果把代码放到线上,注意安全性,1.这个参数是只有内部系统产生2.预发测试完成后注释掉 if("testHystrix".equals(swiftNumber)){ //如果是testHystrix,睡眠10s,用于测试hystrix超时降级。 try { Thread.sleep(10000); } catch (Interru原创 2020-11-03 09:26:55 · 107 阅读 · 0 评论 -
【Hystrix】【07】降级方法不器作用
1.注解需要加载直接调用的方法上,嵌套方法调用不起作用,例如getUserSleepRibbonNotHystrixError2.如果必须调用可以获取bean调用通过aop代理调用3.如果不是spring管理的类,无法通过Aware获取ApplicationContext,可以考虑把ApplicationContext做成类变量4.demopackage com.zhenzhen.demo.springcloud2.orderservice.service.impl;import com.net原创 2020-11-02 23:17:02 · 167 阅读 · 0 评论 -
【Hystrix】【08】ribbon.ReadTimeout和hystrix.command.default.execution.isolation.thread.timeoutInMillisec
1.使用ribbon调用的时候超时不起作用,可能使用fegin的时候才起作用ribbon: ConnectTimeout: 5000 ReadTimeout: 50002.timeoutInMilliseconds和setReadTimeout 谁小使用谁hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 5000HttpComponentsClientHttpRequestFactory c原创 2020-10-31 19:25:08 · 619 阅读 · 0 评论 -
【Hystrix】【01】断路器的使用
官网https://cloud.spring.io/spring-cloud-static/Finchley.SR4/single/spring-cloud.html#_circuit_breaker_hystrix_clientshttps://github.com/Netflix/Hystrix/tree/master/hystrix-contrib/hystrix-javanica#configurationhttps://github.com/Netflix/Hystrix/wiki/Conf原创 2020-10-15 17:02:29 · 143 阅读 · 0 评论 -
【Hystrix】【04】断路器的核心配置和原理
wikihttps://github.com/Netflix/Hystrix/wiki/Configuration#CommandCircuitBreaker原理图,官网有时候图片需要翻墙才能加载出来https://github.com/Netflix/Hystrix/wiki/How-it-Works1.配置circuitBreaker.enabledThis property determines whether a circuit breaker will be used to tra原创 2020-05-28 12:15:23 · 183 阅读 · 0 评论