Can NGinx replace Varnish

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…?

Posted at Nginx Forum:

On 14 Nov 2012 15h31 CET, [email protected] wrote:

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).

You can drop Varnish from the picture if something like microcaching
suits you or you use ngx_cache_purge with the purge module. It depends
if you have an active invalidation strategy or not. Either way Nginx
can replace Varnish and work also as load balancer. So you’ll have a
simpler stack.

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…?

Yep. See above. For Drupal related Nginx issues there’s a GDO group:

http://groups.drupal.org/nginx

if want to delve deeper into the issue.

— appa

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 C.
CEO, ScaleEngine Inc.
“Streaming, CDN, and Internet Logistics”
E: [email protected]
Toronto: +1 647 459 9475
+1 800 224 0192

On Wed, Nov 14, 2012 at 12:39 PM, Antnio P. P. Almeida

On Wed, Nov 14, 2012 at 09:31:28AM -0500, gt420hp wrote:

Hi there,

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…

If the caching issues are because your backend servers are configured
incorrectly, merely replacing Varnish with nginx is unlikely to fix
everything.

If they are because your Varnish is configured incorrectly, then
replacing an incorrectly-configured Varnish with a correctly-configured
nginx probably will help. But replacing it with a correctly-configured
Varnish would probably also help.

Good luck with it,

f

Francis D. [email protected]