Multiple dynos on Heroku + socket.io broadcasts

后端 未结 1 1493
无人共我
无人共我 2021-01-05 13:52

I seem to be having an issue where socket.io broadcasts in my node.js app on Heroku don\'t seem to work when I have more than 1 dyno. As soon as I scale it to 1, it works p

相关标签:
1条回答
  • 2021-01-05 14:22

    If you're running on multiple dynos/servers then you have to configure socket.io to use a non-in-memory session store like the RedisStore. The socket.io documentation has details and there's more discussion here.

    0 讨论(0)
提交回复
热议问题