views:

788

answers:

1

with apache, is it reasonable to reduce MaxClients when KeepAlive is Off? currently, MaxClients is set to 150, which is the default for mpm-worker.

  • nginx serves static files and reverse-proxies to apache
  • we are averaging around 12-15 requests per second
  • cpu load avg is never above 0.8 on a quad-core box

thanks!

+1  A: 

Not allowing keep alive connections does mean that one could technically drop MaxClients. This is because request handler threads in Apache will not be tied up waiting to see if there will be a subsequent request on same connection. Thus, you would get better utilisation of available request handler threads and so may not need as many.

Also worth knowing is that if all traffic is coming via nginx, is that nginx only implements HTTP/1.0 in its proxy module and also doesn't implement keep alive requests over the proxied connection. Thus, using keep alive on the Apache side is pointless when using nginx in front of it. Because though nginx doesn't implement keep alive, it should drop the connections promptly as it will have no intention of reusing them, so you shouldn't suffer if you do forget to turn of keep alive in Apache when using nginx as front end.

That nginx proxy only supports HTTP/1.0 and does not use keep alive is mentioned in its proxy documentation:

http://wiki.nginx.org/NginxHttpProxyModule

Graham Dumpleton