I am trying to scale a socket.io process to multiple dynos on Heroku which doesn't offer sticky-session routing and wanted to get around this issue by using WebSockets as the only transport. Is there any way to do this with 1.1? Also curious if anyone has any information on what the downsides of doing this would be other than losing browser compatibility?
AFAIK IE8 and IE9 won't be able to use websockets.
To force your client to use only websocket, in your client code you could use something like:
io.connect("http://your.domain.com", {transports: ['websocket']});
Seems like this will still falllback to using other transports if the Websocket connection fails (or perhaps it tries to use other connection methods first)
@distracteddev it shouldn't be using any other transports when using {transports: ['websocket']}
. Does something (like debug output) seem to indicate otherwise?
You should probably limit the transports to only the WebSocket transport on the server too, if your connections will work with them only.
Most helpful comment
AFAIK IE8 and IE9 won't be able to use websockets.
To force your client to use only websocket, in your client code you could use something like:
io.connect("http://your.domain.com", {transports: ['websocket']});