hystrix断路器不能打开

oewdyzsn  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(247)

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

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)))

属性:

hystrix:
  command:
    default:
      circuitBreaker:
        enabled: true
        requestVolumeThreshold: 10
        sleepWindowInMilliseconds: 20000
      execution:
        timeout:
          enabled: true
        isolation:
          thread:
            timeoutInMilliseconds: 4000

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题