spring-cloud-netflix icon indicating copy to clipboard operation
spring-cloud-netflix copied to clipboard

Increasing Zuul capacity in handling requests

Open gsamartian opened this issue 8 years ago • 5 comments

I want to know how to increase the capacity of zuul.

We are using Spring Cloud Edgware.SR2 release and also using serviceId based routing instead of url routing.

As per the docs, I see there are 2 properties, zuul.host.maxTotalConnections and zuul.host.maxPerRouteConnection

But, there is also serviceId.ribbon.MaxTotalConnections and serviceId.ribbon.MaxConnectionsPerHost which can be configured when using ribbon. Should these be configured in addition to zuul.host properties.

I read somewhere that when using routing as per serviceId we should use serviceId.ribbon.* instead of zuul.host.

I understand that the properties set are used to customize the ribbon http client being used.

Can you let us know if we need to have them both set or just the serviceId.ribbon.* properties to increase our zuul's capacity in handling requests.

gsamartian avatar Apr 07 '18 02:04 gsamartian

If you are routing with urls, then use the zuul.* properties, otherwise ribbon. If you prefix with service id, then those are only for that service, otherwise it is a ribbon default.

spencergibb avatar Apr 07 '18 06:04 spencergibb

@spencergibb if I use url routing, increasing the maxPerRouteConnection will increase the capacity of Zuul?

jadetang avatar Apr 17 '18 06:04 jadetang

From the documentation

zuul.host.maxTotalConnections and zuul.host.maxPerRouteConnections which default to 200 and 20 respectively

ryanjbaxter avatar Apr 17 '18 15:04 ryanjbaxter

given zuul 1.x, dont you have to additionally increase server.tomcat.max-threads as well or even keep in sync with zuul.host.maxTotalConnections? Reasoning: spring/zuul1.x operates in blocking mode and require an active tomcat thread per active zuul host conection towards the backend - assuming your zuul application is used soley as an edge-router.

Michael-Frank avatar Apr 30 '18 21:04 Michael-Frank

Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.

spring-projects-issues avatar Oct 07 '18 06:10 spring-projects-issues