Tuesday, 16 August 2016

socket.io running on multi instances



https://elements.heroku.com/addons/heroku-redis

http://stackoverflow.com/questions/26217312/socket-io-and-multiple-dynos-on-heroku-node-js-app-websocket-is-closed-before



http://socket.io/docs/using-multiple-nodes/

https://devcenter.heroku.com/articles/session-affinity




above solutions are different solutions some of them just try to keep the same client on the same node. which is not the solution for my app which is a chat app.


Only socket.io-redis do broadcast messages between nodes:

https://github.com/socketio/socket.io-redis

but i don't know how to mange it to work.....





No comments:

Post a comment