微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Hystrix 断路器无法打开

如何解决Hystrix 断路器无法打开

我在使用 Hystrix 断路器时遇到问题。当我在本地运行应用程序时,断路器工作,但在 kubernetes 集群上运行应用程序无法打开断路器。我注意到本地 hystrix 指标计算正确,但是在 kubernetes 集群上,应用程序记录了奇怪的数量。例如总请求: 0,1,2,3,4,5 然后指标重置。我的 hystrix 命令:

ApplicationDbContext

属性

return new HystrixCommand<ResponseEntity<V>>(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey(key))
                        .andCommandKey(HystrixCommandKey.Factory.asKey(key)).andThreadPoolKey(HystrixThreadPoolKey.Factory.asKey(key))
                .andThreadPoolPropertiesDefaults(
                                HystrixThreadPoolProperties.Setter()
                                        .withCoreSize(10)
                                        .withMaxQueueSize(-1)
                                        .withQueueSizeRejectionThreshold(5)).andCommandPropertiesDefaults(
                                HystrixCommandProperties.Setter().withExecutionIsolationStrategy(
                                        ExecutionIsolationStrategy.THREAD))) 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。