Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you have Varnish then why have nginx? Is there an advantage to having nginx do the request routing?


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


Well, the sample is incomplete. Often, you also need a server for serving static files, which Nginx is really good at, but Varnish cannot do.


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


FYI, compression was added to Varnish in 3.x:

https://www.varnish-cache.org/docs/3.0/tutorial/compression....




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: