by tlrobinson · 13y ago · 0 comments
Normally I think it's best for HTTP backends to be stateless, but WebSockets open up interesting possibilities for RPC solutions like NowJS (https://github.com/Flotype/now), dnode (https://github.com/substack/dnode), and others (https://github.com/kriskowal/q-connection) that benefit from keeping state in memory in the app servers.
I'd be interested to hear about other load balancing techniques for WebSockets.
For the initial connection, you can use any of nginx's normal proxy load balancing options (ip_hash, least_conn, etc).
http://blog.exceliance.fr/2012/11/07/websockets-load-balanci...
dotCloud's Hipache also looks like it was basically written to solve this problem: