Varnish as a reverse proxy to Nginx?


#1

Hi,

have you had an experience using varnish as a reverse proxy to nginx? I have seen quite a few examples of varnish acting purely as a caching mechanism with nginx as a reverse proxy to apache. I have heard that lots of people say that varnish will be a lot faster than Nginx for returning cached content. What do you think? Would Varnish + Nginx be faster than just Nginx?

Jack


#2

@Jack

nginx as a reverse proxy to apache.

IMHO, this is worst combo one can use. Why use Apache when Nginx can handle stuff on its own?

Varnish + Nginx v/s Nginx

I never used Varnish + Nginx together and probably, I will never give Varnish a try unless its considerable faster than Nginx alone.

A performance gain of 5-10% is not significant enough to have complicated setup. IMHO, every package we install makes it tougher to debug a setup if something goes wrong.

By the way, this benchmark might help you - http://todsul.com/nginx-varnish

If you give a try yourself, please feel free to share your results :-)


#3

Update: I recently posted my long answer on this topic here - rtcamp.com/tutorials/why-we-never-use-varnish-with-nginx/


#4