News for hackers. Stuff that matters.
Re:Nginx 1.2.0 (stable) released by derefr on Monday April 23, 2012 @08:25PM (#3881776)
Interesting--does the above-mentioned feature mean that nginx can finally be put in front of a websocket server (e.g., socket.io)?
Re:Nginx 1.2.0 (stable) released by moonboots on Monday April 23, 2012 @09:56PM (#3882043)
I'm not sure if understanding HTTP/1.1 is enough to bridge a websocket connection between client and backend websocket server. However, there is a 3rd party tcp proxy module for nginx that allows proxying websockets:

https://github.com/yaoweibin/nginx_tcp_proxy_module

Re:Nginx 1.2.0 (stable) released by pornel on Tuesday April 24, 2012 @06:33AM (#3883270)
WebSockets aren't HTTP — fake header is not enough to fool HTTP-compliant servers/proxies. You could try HTTPS WebSockets with TLS 1.1 SNI vhosts.

I recommend using Server-Sent Events instead. You get nearly same API for realtime server->client push, and they're HTTP-compatible:

http://html5doctor.com/server-sent-events/ http://speakerdeck.com/u/pornel/p/server-sent-events

Re:Nginx 1.2.0 (stable) released by Argorak on Tuesday April 24, 2012 @02:57AM (#3882807)
If you use TCP proxying, you have no way to react on HTTP headers. So either your Websocket server runs on a different port or interface or you have to proxy _all_ traffic on that port to your websocket backend.
Re:Nginx 1.2.0 (stable) released by pippy on Monday April 23, 2012 @09:24PM (#3881953)
This is fantastic, I was just talking about this on HN a few days ago: http://news.ycombinator.com/reply?id=3865966&whence=thre...
Re:Nginx 1.2.0 (stable) released by AUmrysh on Monday April 23, 2012 @08:28PM (#3881786)
I think it's capable of doing this, but I read that you have to disable the http proxy cache or something similar.

edit: that's for version 1.0.X though, not sure about 1.1