4 ms·
See this series of posts: http://www.exratione.com/2012/07/proxying-websocket-traffic-for-nodejs-the-present-state-of-play/ http://www.exratione.com/2012/07/pr
by exratione 14y ago
See this series of posts:
http://www.exratione.com/2012/07/proxying-websocket-traffic-for-nodejs-the-present-state-of-play/ http://www.exratione.com/2012/07/proxying-websocket-traffic-...
http://www.exratione.com/2012/08/websockets-over-ssl-stunnel-varnish-nginx-nodejs/ http://www.exratione.com/2012/08/websockets-over-ssl-stunnel...
http://www.exratione.com/2012/12/websockets-over-ssl-haproxy-nodejs-nginx/ http://www.exratione.com/2012/12/websockets-over-ssl-haproxy...
"So let us say that you are developing a Node.js / Socket.IO application that both uses websockets and serves files the old-fashioned way, such as through Express - this is a fairly common situation. You want to have an HTTP proxy server rather than Node.js field all incoming traffic, so that you can set up load balancing, route requests for static files to some other server process, avoid having to set up SSL configuration in Node.js, and so forth.
"Unfortunately at this point in time it isn't completely straightforward to proxy both websocket traffic and ordinary web requests for Node.js through a single port - which would be the ideal situation. It becomes even less straightforward if you want to use SSL. The following is a brief overview of present options as of early Q3 2012."
"The up-front summary: if you are reading this after Nginx adds support for proxying websocket traffic to Node.js (supposedly coming up in version 1.3), then everything is rainbows and unicorns - just use Nginx. If you are reading this prior to Nginx support for proxying of websocket traffic, then you will likely have to do more work and investigation in order to create a good proxy setup for your servers."