I have read a bunch of conflicting information on whether
socket.io
will work using nodejs cluster - or on different servers behind a load-
balancing proxy. I'm scratching my head. What is the latest status on
this?
We are using express (v2.5.11) + nodejs (v0.8.9), and
socket.io
(0.9.6) configured with RedisStore. We haven't configured any specific
socket.io transport.
Up until now, we have been running on just 1 server using cluster with
just one node-worker. As app load increases, we plan to run more than
1 node worker , and eventually on more than 1 server.
Currently, due to issues with our (unreliable) internal load-balancers/
proxies, we do a kind of handshake on initial connection - whereby we
connect, receive the direct server hostname, disconnect and reconnect
to the server directly (ie no longer through the load balancer). I
_think_ this should mean we dont have to worry about any load-balancer-
related issues.
The question remains whether
socket.io will work with nodejs cluster
when using RedisStore. I see explanations of why it wont work -
but ... I haven't yet seen any errors yet in our app (we are running 2
workers).
So the question is, should it work? If not, what problems should I
expect. If yes, with what limitations?
Any pointers to definitive information welcome.