Portal Home > Knowledgebase > Articles Database > nginx proxy_cache with apache backend (keepalive?)


nginx proxy_cache with apache backend (keepalive?)




Posted by Gigaron, 11-30-2010, 02:22 PM
I've read tons of people say to NOT use keep alive at all when using proxy_caching on nginx to an apache backend. I tried : * Nginx Front end (keepalive off) * Apache Back end (keepalive off) CPU > 70% all the time with tons of "W" sending reply and growing Then I tried * Nginx Front end (keepalive off) * Apache Back end (Keepalive On) CPU = 0.01% and all smooth sailing.... Am I missing something here? Everyone says to have Keepalive off... ?

Posted by muratzilla, 11-30-2010, 02:24 PM
If you are using nginx to serve lots of static images keepalive is your best friend.

Posted by Gigaron, 11-30-2010, 02:26 PM
well in my case I did a 10 minute cache on nginx. So its basically caching every page for 10 minutes making them static.... However, I am not serving images from any of these servers. Images is loaded from a CDN. So this is basically just all php.

Posted by muratzilla, 11-30-2010, 02:30 PM
If you are caching dynamic pages (without cookies) you can try varnish instead of nginx proxy_cache.

Posted by 247allies, 11-30-2010, 02:33 PM
Exactly... Nginx would always be better for static files



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
KVM Routing Bridge (Views: 601)
Let's do the math here (Views: 571)