The idea is similar to #429 but optimizes different parts - the socket.emit() and .to(socketId).emit() calls. The affected calls now result in 1/8 of the bandwidth compared to before, as the messages are sent only to one process, instead of all 8. I'll follow up with fetchSockets() optimization in another PR.
Uses a new feature of the adapter I added in https://github.com/MartinKolarik/socket.io-redis-adapter/tree/dynamic-private-2, which allows creating separate channels for private rooms (the original adapter only supports this for public rooms so far; if this works well, I'll make a PR to upstream).
The idea is similar to #429 but optimizes different parts - the
socket.emit()
and.to(socketId).emit()
calls. The affected calls now result in1/8
of the bandwidth compared to before, as the messages are sent only to one process, instead of all 8. I'll follow up withfetchSockets()
optimization in another PR.