0 Github

资源隔离两种策略

  • 线程池隔离
  • 信号量隔离

对于资源隔离,做更加深入一些的讲解,除了可以选择隔离策略,对选择的隔离策略,可以做一定的细粒度的控制

1 execution.isolation.strategy

指定HystrixCommand.run()的资源隔离策略

  • THREAD
    基于线程池
// to use thread isolationHystrixCommandProperties.Setter()   .withExecutionIsolationStrategy(ExecutionIsolationStrategy.THREAD)
  • SEMAPHORE
    基于信号量// to use semaphore isolation

HystrixCommandProperties.Setter()
.withExecutionI

收藏 打印