News for hackers. Stuff that matters.
Re:WebSockets with Varnish and Nginx by PleaseBeSerious on Thursday May 17, 2012 @11:27AM (#3987393)
If you have Varnish then why have nginx? Is there an advantage to having nginx do the request routing?
Re:WebSockets with Varnish and Nginx by jiggy2011 on Thursday May 17, 2012 @11:45AM (#3987475)
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.

Re:WebSockets with Varnish and Nginx by Argorak on Thursday May 17, 2012 @12:11PM (#3987636)
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.
Re:WebSockets with Varnish and Nginx by roschdal on Thursday May 17, 2012 @11:36AM (#3987431)
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.

Re:WebSockets with Varnish and Nginx by sureshv on Thursday May 17, 2012 @11:52AM (#3987514)
FYI, compression was added to Varnish in 3.x:

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