3 ms·
If you have Varnish then why have nginx? Is there an advantage to having nginx do the request routing?
by PleaseBeSerious 15y ago
If you have Varnish then why have nginx? Is there an advantage to having nginx do the request routing?
- roschdal 15y agonginx can compress your HTTP traffic, while Varnish can't. So there are some things you would need nginx for. However, I really think that nginx should implement proper support for WebSockets by now. I have requested this previously, but the request got unanswered.
- sureshv 15y agoFYI, compression was added to Varnish in 3.x: https://www.varnish-cache.org/docs/3.0/tutorial/compression.html https://www.varnish-cache.org/docs/3.0/tutorial/compression....
- jiggy2011 15y agoI would think nginx would be better for holding open long "keep alive" connections than Apache or IIS if you are doing long polling etc. Of course if you are just forwarding to another backend you may lose this.
- Argorak 15y agoWell, the sample is incomplete. Often, you also need a server for serving static files, which Nginx is really good at, but Varnish cannot do.