spring-cloud / spring-cloud-netflix

Integration with Netflix OSS components
http://cloud.spring.io/spring-cloud-netflix/
Apache License 2.0
4.87k stars 2.44k forks source link

maxSemaphores per route in Zuul #1611

Closed vasandharaj closed 7 years ago

vasandharaj commented 7 years ago

In Zuul, we are using the default isolation strategy (semaphore) with out eureka. I have found that we can specify the maxSemaphores like zuul.semaphore.maxSemaphores=10 from this issue (https://github.com/spring-cloud/spring-cloud-netflix/issues/1332). But this setting will affect all the services in the zuul.

Is it possible to specify the maxSemaphores per zuul route ?? For example, zuul.es.semaphore.maxSemaphores=10 for a specific route.

Please find the sample configuration below ribbon.eureka.enabled=false zuul.routes.es.path=/es/** zuul.routes.es.serviceId=es es.ribbon.listOfServers=XXXXXXXX

zuul.routes.search.path=/search/** zuul.routes.search.serviceId=search search.ribbon.listOfServers=XXXXXX

We are using spring cloud netflix 1.2.3 in our production

ryanjbaxter commented 7 years ago

I believe you can do this, see #1130

vasandharaj commented 7 years ago

@ryanjbaxter : we are not using the eureka in our zuul.

ribbon.eureka.enabled=false

Since we have disabled the eureka, Is the below statement work for my scenario ??

zuul.eureka.es.semaphore.maxSemaphores=50

ryanjbaxter commented 7 years ago

I believe so, Hystrix should not be dependent on whether you are using Eureka or not.

vasandharaj commented 7 years ago

@ryanjbaxter

Its works fine thanks a lot for your help.