问题描述
我在使用 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 (将#修改为@)