I am using spring-cloud-netflix-zuul
for our gateway for multiple services, when I observed the performance of each application using appdynamics
I found that the request is taking 2 - 23 ms
at gateway and the specific service to process the request but from gateway to service the HTTP
is taking 250 - 500 ms
so just wondering why it is taking long time. I have gone through the document found here and I have increased the per host max connections and total max connection and I see we are using SEMAPHORE
and the performance results were good, it got improved but I
Steps Taken:
- Increased the maxConnections
zuul.host.max-total-connections = 2000
- Increased maxConnections per host
zuul.host.max-per-route-connections = 500
- With Default semaphores
- Increased semaphores - zuul.semaphore.maxSemaphores = 3000
Observations:
- With increased total and per host max connections found the HTTP time got decreased
- With default or increased or decreased to 1 semaphore didn't see any difference
Questions:
- Is there any queue to check/debug when max connections per host is say 10 and gateway got 1000 requests where these 990 connections sits?
- When to increase semaphore how it is useful?
- How to calculate per host connections to set Max Connections per host and also total max connections?
- How to check the IsolationStrategy of my gateway? I see it as
"ribbonIsolationStrategy": "SEMAPHORE"
but I am not using ribbon/serviceId concept, I am using host concept where I provide allzuul.routes
with host,path,url.