New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
well, varnish is more advanced in terms of caching, but nginx is more suitable as a web server
use both
Is there some kind of system to sync configure/manage instance of either varnish or nginx across different servers?
Varnish is incredibly powerful. Really cool stuff.
So long as you aren't using Apache you've got my approval!
varnish is cache server, nginx is proxy server.
technically nginx is a proxy caching server, and so is varnish.
Zen is amazing.
Mun
They are 2 completely different applications: you may as well ask "Word vs Powerpoint"?
I prefer a stack like so, which includes the addition of HAproxy (dynamic content goes nginx, static to Varnish):
HTTP: HAproxy --> (Varnish or nginx) --> App (PHP, Python, NodeJS, etc)
Since Varnish doesn't support HTTPS you have a few options, for just a cart implementation I'd go with #1. If you serve the entire site over HTTPS obviously the others are better choices:
1: HAproxy --> nginx --> App (PHP, Python, NodeJS, etc)
2: HAproxy --> nginx --> Varnish --> nginx --> App
3: HAproxy --> Pound --> Varnish --> nginx --> App
This StackOverflow question and the linked to blog post is one of the best pros/cons overviews I've seen.
Nginx has all the power of varnish and more
i like to learn varnish
Why not both, Varnish + Nginx?
Really depends on what you host behind apache.
But cache proxy are useful mostly for static content only. And both varnish & nginx here perform nearly the same.
I think nginx are better documented and more widely used.
PS: Check this benchmarks also http://www.garron.me/en/linux/apache-vs-nginx-php-fpm-varnish-apc-wordpress-performance.html
I use nginx in front of varnish, and varnish in front of apache!
nginx cache css/js/image. Varnish use for fullpage cache.
Then that is how you have set it up. You can cache any extension with Nginx.
I need a server as a front end proxy/cache. So, there is no reason to use both. For backend server, it is out of scope of this question.
Why you need nginx-> varnish->apache?
I think varnish->apache or nginx->apache should be enough?
Yes. Good tutorials for Varnish is really difficult to find
beginning, I use nginx -> apache, but it's slow to, then I set varnish between nginx and apache. If not searching, very fast, and get low load
nginx depends on more of an expert configuration than varnish
nginx has alot more flexibility, but that can cost in performance if configured in correctly (e.g If is Evil).
Personally I side with a correctly configured nginx, else if you aren't capable Varnish. Although if you dont have the traffic (1M+ PV) who cares.
The main difference between nginx and varnish when caching are flexibility and purging.
Varnish is more flexible when you have complex cache structure and/or need esi. Purging/Banning is another key advantage of varnish, You can have different ttls and regex ban, something not possible in nginx.
+1 for Nginx