How to choose correct value for executionIsolationSemaphoreMaxConcurrentRequestsIs Java “pass-by-reference” or “pass-by-value”?How do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How to get an enum value from a string value in Java?How do I determine whether an array contains a particular value in Java?How do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?Spring Boot Zuul - Hystrix short-circuited is OPEN

Book in which the "mountain" in the distance was a hole in the flat world

Strange LED behavior

Importance of moon phases for Apollo missions

Calculating Fibonacci sequence in several different ways

Why did computer video outputs go from digital to analog, then back to digital?

Why is there an extra "t" in Lemmatization?

Caption in landscape table, need help?

Why didn't NASA launch communications relay satellites for the Apollo missions?

Can "Taking algebraic closure" be made into a functor?

Did Don Young threaten John Boehner with a 10 inch blade to the throat?

Can I make Ubuntu 18.04 switch between multiple windows of the program by just clicking the icon?

Why Lie algebras if what we care about in physics are groups?

Why are Oscar, India, and X-Ray (O, I, and X) not used as taxiway identifiers?

Host telling me to cancel my booking in exchange for a discount?

How does mathematics work?

Impact of throwing away fruit waste on a peak > 3200 m above a glacier

Why is DC so, so, so Democratic?

Killing a star safely

What are "the high ends of castles" called?

What would be the effects of (relatively) widespread precognition on the stock market?

Has Iron Man made any suit for underwater combat?

How to indicate the lack of sarcasm online

How can I deal with someone that wants to kill something that isn't supposed to be killed?

My current job follows "worst practices". How can I talk about my experience in an interview without giving off red flags?



How to choose correct value for executionIsolationSemaphoreMaxConcurrentRequests


Is Java “pass-by-reference” or “pass-by-value”?How do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow do I read / convert an InputStream into a String in Java?How do I generate random integers within a specific range in Java?How to get an enum value from a string value in Java?How do I determine whether an array contains a particular value in Java?How do I convert a String to an int in Java?How do I fix android.os.NetworkOnMainThreadException?Spring Boot Zuul - Hystrix short-circuited is OPEN






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I'm wondering how to correclty set value for executionIsolationSemaphoreMaxConcurrentRequests in hystrix configuration for spring-cloud-gateway. Default value is 10 but it can be exceeded by one user in our case. How should I pick the right value? How to calulate it based on time window in hystrix and expected number of users?



Below example configuration:



@Value("$hystrix.circuitBreakerRequestVolumeThreshold : 20")
private int circuitBreakerRequestVolumeThreshold;

@Value("$hystrix.executionTimeoutInMilliseconds : 30000")
private int executionTimeoutInMilliseconds;

@Value("$hystrix.circuitBreakerSleepWindowInMilliseconds : 10000")
private int circuitBreakerSleepWindowInMilliseconds;

@Value("$hystrix.metricsRollingPercentileWindowInMilliseconds : 60000")
private int metricsRollingPercentileWindowInMilliseconds;

@Value("$hystrix.metricsHealthSnapshotIntervalInMilliseconds : 500")
private int metricsHealthSnapshotIntervalInMilliseconds;

@Value("$hystrix.circuitBreakerErrorThresholdPercentage : 50")
private int circuitBreakerErrorThresholdPercentage;

@Value("$hystrix.metricsRollingStatisticalWindowInMilliseconds : 10000")
private int metricsRollingStatisticalWindowInMilliseconds;


@Value("$hystrix.executionIsolationSemaphoreMaxConcurrentRequests : 50")
private int executionIsolationSemaphoreMaxConcurrentRequests;

public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName)
return getHystrixConfig(groupName, serviceName, executionTimeoutInMilliseconds);


public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName, int timeout)
return config -> config
.setSetter(HystrixObservableCommand.Setter
.withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupName))
.andCommandKey(HystrixCommandKey.Factory.asKey(serviceName))
.andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
.withCircuitBreakerEnabled(true)
.withCircuitBreakerRequestVolumeThreshold(circuitBreakerRequestVolumeThreshold)
.withExecutionIsolationSemaphoreMaxConcurrentRequests(executionIsolationSemaphoreMaxConcurrentRequests)
.withExecutionTimeoutInMilliseconds(timeout)
.withCircuitBreakerSleepWindowInMilliseconds(circuitBreakerSleepWindowInMilliseconds)
.withMetricsRollingPercentileWindowInMilliseconds(metricsRollingPercentileWindowInMilliseconds)
.withMetricsHealthSnapshotIntervalInMilliseconds(metricsHealthSnapshotIntervalInMilliseconds)
.withCircuitBreakerErrorThresholdPercentage(circuitBreakerErrorThresholdPercentage)
.withMetricsRollingStatisticalWindowInMilliseconds(metricsRollingStatisticalWindowInMilliseconds)
)
)
.setFallbackUri("forward:/hystrixfallback");










share|improve this question




























    1















    I'm wondering how to correclty set value for executionIsolationSemaphoreMaxConcurrentRequests in hystrix configuration for spring-cloud-gateway. Default value is 10 but it can be exceeded by one user in our case. How should I pick the right value? How to calulate it based on time window in hystrix and expected number of users?



    Below example configuration:



    @Value("$hystrix.circuitBreakerRequestVolumeThreshold : 20")
    private int circuitBreakerRequestVolumeThreshold;

    @Value("$hystrix.executionTimeoutInMilliseconds : 30000")
    private int executionTimeoutInMilliseconds;

    @Value("$hystrix.circuitBreakerSleepWindowInMilliseconds : 10000")
    private int circuitBreakerSleepWindowInMilliseconds;

    @Value("$hystrix.metricsRollingPercentileWindowInMilliseconds : 60000")
    private int metricsRollingPercentileWindowInMilliseconds;

    @Value("$hystrix.metricsHealthSnapshotIntervalInMilliseconds : 500")
    private int metricsHealthSnapshotIntervalInMilliseconds;

    @Value("$hystrix.circuitBreakerErrorThresholdPercentage : 50")
    private int circuitBreakerErrorThresholdPercentage;

    @Value("$hystrix.metricsRollingStatisticalWindowInMilliseconds : 10000")
    private int metricsRollingStatisticalWindowInMilliseconds;


    @Value("$hystrix.executionIsolationSemaphoreMaxConcurrentRequests : 50")
    private int executionIsolationSemaphoreMaxConcurrentRequests;

    public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName)
    return getHystrixConfig(groupName, serviceName, executionTimeoutInMilliseconds);


    public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName, int timeout)
    return config -> config
    .setSetter(HystrixObservableCommand.Setter
    .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupName))
    .andCommandKey(HystrixCommandKey.Factory.asKey(serviceName))
    .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
    .withCircuitBreakerEnabled(true)
    .withCircuitBreakerRequestVolumeThreshold(circuitBreakerRequestVolumeThreshold)
    .withExecutionIsolationSemaphoreMaxConcurrentRequests(executionIsolationSemaphoreMaxConcurrentRequests)
    .withExecutionTimeoutInMilliseconds(timeout)
    .withCircuitBreakerSleepWindowInMilliseconds(circuitBreakerSleepWindowInMilliseconds)
    .withMetricsRollingPercentileWindowInMilliseconds(metricsRollingPercentileWindowInMilliseconds)
    .withMetricsHealthSnapshotIntervalInMilliseconds(metricsHealthSnapshotIntervalInMilliseconds)
    .withCircuitBreakerErrorThresholdPercentage(circuitBreakerErrorThresholdPercentage)
    .withMetricsRollingStatisticalWindowInMilliseconds(metricsRollingStatisticalWindowInMilliseconds)
    )
    )
    .setFallbackUri("forward:/hystrixfallback");










    share|improve this question
























      1












      1








      1


      1






      I'm wondering how to correclty set value for executionIsolationSemaphoreMaxConcurrentRequests in hystrix configuration for spring-cloud-gateway. Default value is 10 but it can be exceeded by one user in our case. How should I pick the right value? How to calulate it based on time window in hystrix and expected number of users?



      Below example configuration:



      @Value("$hystrix.circuitBreakerRequestVolumeThreshold : 20")
      private int circuitBreakerRequestVolumeThreshold;

      @Value("$hystrix.executionTimeoutInMilliseconds : 30000")
      private int executionTimeoutInMilliseconds;

      @Value("$hystrix.circuitBreakerSleepWindowInMilliseconds : 10000")
      private int circuitBreakerSleepWindowInMilliseconds;

      @Value("$hystrix.metricsRollingPercentileWindowInMilliseconds : 60000")
      private int metricsRollingPercentileWindowInMilliseconds;

      @Value("$hystrix.metricsHealthSnapshotIntervalInMilliseconds : 500")
      private int metricsHealthSnapshotIntervalInMilliseconds;

      @Value("$hystrix.circuitBreakerErrorThresholdPercentage : 50")
      private int circuitBreakerErrorThresholdPercentage;

      @Value("$hystrix.metricsRollingStatisticalWindowInMilliseconds : 10000")
      private int metricsRollingStatisticalWindowInMilliseconds;


      @Value("$hystrix.executionIsolationSemaphoreMaxConcurrentRequests : 50")
      private int executionIsolationSemaphoreMaxConcurrentRequests;

      public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName)
      return getHystrixConfig(groupName, serviceName, executionTimeoutInMilliseconds);


      public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName, int timeout)
      return config -> config
      .setSetter(HystrixObservableCommand.Setter
      .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupName))
      .andCommandKey(HystrixCommandKey.Factory.asKey(serviceName))
      .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
      .withCircuitBreakerEnabled(true)
      .withCircuitBreakerRequestVolumeThreshold(circuitBreakerRequestVolumeThreshold)
      .withExecutionIsolationSemaphoreMaxConcurrentRequests(executionIsolationSemaphoreMaxConcurrentRequests)
      .withExecutionTimeoutInMilliseconds(timeout)
      .withCircuitBreakerSleepWindowInMilliseconds(circuitBreakerSleepWindowInMilliseconds)
      .withMetricsRollingPercentileWindowInMilliseconds(metricsRollingPercentileWindowInMilliseconds)
      .withMetricsHealthSnapshotIntervalInMilliseconds(metricsHealthSnapshotIntervalInMilliseconds)
      .withCircuitBreakerErrorThresholdPercentage(circuitBreakerErrorThresholdPercentage)
      .withMetricsRollingStatisticalWindowInMilliseconds(metricsRollingStatisticalWindowInMilliseconds)
      )
      )
      .setFallbackUri("forward:/hystrixfallback");










      share|improve this question














      I'm wondering how to correclty set value for executionIsolationSemaphoreMaxConcurrentRequests in hystrix configuration for spring-cloud-gateway. Default value is 10 but it can be exceeded by one user in our case. How should I pick the right value? How to calulate it based on time window in hystrix and expected number of users?



      Below example configuration:



      @Value("$hystrix.circuitBreakerRequestVolumeThreshold : 20")
      private int circuitBreakerRequestVolumeThreshold;

      @Value("$hystrix.executionTimeoutInMilliseconds : 30000")
      private int executionTimeoutInMilliseconds;

      @Value("$hystrix.circuitBreakerSleepWindowInMilliseconds : 10000")
      private int circuitBreakerSleepWindowInMilliseconds;

      @Value("$hystrix.metricsRollingPercentileWindowInMilliseconds : 60000")
      private int metricsRollingPercentileWindowInMilliseconds;

      @Value("$hystrix.metricsHealthSnapshotIntervalInMilliseconds : 500")
      private int metricsHealthSnapshotIntervalInMilliseconds;

      @Value("$hystrix.circuitBreakerErrorThresholdPercentage : 50")
      private int circuitBreakerErrorThresholdPercentage;

      @Value("$hystrix.metricsRollingStatisticalWindowInMilliseconds : 10000")
      private int metricsRollingStatisticalWindowInMilliseconds;


      @Value("$hystrix.executionIsolationSemaphoreMaxConcurrentRequests : 50")
      private int executionIsolationSemaphoreMaxConcurrentRequests;

      public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName)
      return getHystrixConfig(groupName, serviceName, executionTimeoutInMilliseconds);


      public Consumer<HystrixGatewayFilterFactory.Config> getHystrixConfig(String groupName, String serviceName, int timeout)
      return config -> config
      .setSetter(HystrixObservableCommand.Setter
      .withGroupKey(HystrixCommandGroupKey.Factory.asKey(groupName))
      .andCommandKey(HystrixCommandKey.Factory.asKey(serviceName))
      .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
      .withCircuitBreakerEnabled(true)
      .withCircuitBreakerRequestVolumeThreshold(circuitBreakerRequestVolumeThreshold)
      .withExecutionIsolationSemaphoreMaxConcurrentRequests(executionIsolationSemaphoreMaxConcurrentRequests)
      .withExecutionTimeoutInMilliseconds(timeout)
      .withCircuitBreakerSleepWindowInMilliseconds(circuitBreakerSleepWindowInMilliseconds)
      .withMetricsRollingPercentileWindowInMilliseconds(metricsRollingPercentileWindowInMilliseconds)
      .withMetricsHealthSnapshotIntervalInMilliseconds(metricsHealthSnapshotIntervalInMilliseconds)
      .withCircuitBreakerErrorThresholdPercentage(circuitBreakerErrorThresholdPercentage)
      .withMetricsRollingStatisticalWindowInMilliseconds(metricsRollingStatisticalWindowInMilliseconds)
      )
      )
      .setFallbackUri("forward:/hystrixfallback");







      java spring-cloud hystrix spring-cloud-gateway circuit-breaker






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 13:32









      justAnotherDeveloperjustAnotherDeveloper

      63 bronze badges




      63 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358461%2fhow-to-choose-correct-value-for-executionisolationsemaphoremaxconcurrentrequests%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358461%2fhow-to-choose-correct-value-for-executionisolationsemaphoremaxconcurrentrequests%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현