Implementation is everything

Image #1 for QA series - Check out more posts tagged as NginxThere was an interesting question in the Nginx mailing list regarding replacing Varnish with Nginx as a load balancer. Let me quote the question directly here…

The question:

We are using Varnish in front of 3 load balanced web servers running apache.  We had migrated from one hosting platform where we had 1 app server and 1 database server using Varnish (Drupal 6.x) and had no issues.  Now that we are running in a load balanced environment (3 load balanced apache web servers, a Varnish server, and 1 database server) we are seeing mulitple examples of cacheing issues. (Pages not displaying correctly… style issues, data input staying cached and used on another page, etc).

We think we can just replace the Varnish server and use a NGinx server.  I don’t want to necessarily remove all the apache servers, but we have to get this cacheing issue corrected….

any thoughts…?

The best answer:

Sorry but what does this have to do with your choice of caching solution? I’ve used nginx for 8 years, and varnish for 4 years. Solution does not matter. Implementation is everything.

If the reverse proxy is not told to stick to a back end based on client ip, you will see this behaviour regardless of solution.

You need to sort out your varnish configuration. Replacing it with nginx without a complete understanding of your webapp and client sessions isn’t going to do anything.

This kind of post, implying that software implementations of RFCs are somehow the issue in misconfigurations, needs to be called out immediately.

Both nginx and varnish implement the HTTP RFCs, and they do it very well. Learn the interfaces to configurations, and use them. It’s ridiculous to imply that nginx or varnish is a better implementation without objective supporting evidence that can be openly discussed.


Stefan Caunter
CEO, ScaleEngine Inc.
“Streaming, CDN, and Internet Logistics”
Toronto: +1 647 459 9475
+1 800 224 0192

I highlighted some text, though. :)

Thanks Stef for answering it with such clarity. As the person who has been using both Nginx and Varnish, I can’t agree more with your answer.

Leave a Reply

Your email address will not be published. We use cookies to prevent spam comments. Required fields are marked *