Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I manage an application that is deployed on Tomcat servers, with nginx in front, as a reverse proxy. I need some help for the sizing of thread pools / connection pools / ... I find quite a lot of documentation describing the different parameters (Tomcat executors, nginx workers, keepalive, ...) but not much documentation explaining how to find the right sizing. And I'm not sure that I understand correctly the documentation.

For example, I see in my nginx monitoring graphs that I have around 350 active connections, 30 writing connections and 320 waiting connections. I have about 30 requests per seconds.

I have 200 threads configured on the Tomcat server to handle HTTP processing.

I have 1 worker process on nginx with 1024 worker connections.

From what I understand from the docs, the waiting connections are HTTP1.1 keepalive. But I also understand that nginx only does HTTP1.0 as a proxy. I am a bit puzzled. Are those waiting connections consuming Tomcat threads doing just nothing ?

Do you know of a good resource about sizing Tomcat / nginx (or another reverse proxy, the concepts should be the same).

Thanks for your help!

share|improve this question
add comment

1 Answer

1 worker process on nginx with 1024 worker connections.

So you cannot handle more than 1*1024 connections and nginx cannot use more than 1 processor core.

But I also understand that nginx only does HTTP1.0 as a proxy.

Wrong. See: http://nginx.org/r/proxy_http_version

Are those waiting connections consuming Tomcat threads doing just nothing

No. It's keepalive connections with clients. Also it may include keepalive connections to backends, but no more than you set up by the keepalive directive ( http://nginx.org/r/keepalive ).

share|improve this answer
    
Good answer, it precise a few points with which I was not clear before. Still, I dont know how to correctly size all those parameters ... –  Guillaume May 21 '12 at 7:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.