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

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript