heroku multiple dyno socket.io

北战南征 提交于 2019-12-05 11:35:28

Sorry, but heroku doesn't support sticky session and it's not supported by Socket.io

Sticky load balancing If you plan to distribute the load of connections among different processes or machines, you have to make sure that requests associated with a particular session id connect to the process that originated them.

Using multiple nodes

There's a great thread in an issue on the engine.io github. Helped me understand the issue of sticky sessions, engine.io, and heroku a lot better.

Sticky Sessions are now supported by Heroku - but only if you join their development (beta) program.

In my experience Heroku works well with socket.io when combined with the Socket.io_Redis plugin and that enabled setting.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!