You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi There! Recently I'm playing around with upgrading redis adapter and socket IO version an I'm trying to understand one change.
In newer versions we're subscribing to all rooms:
For projects handling hundreds thousands of WS connections with multiple machines and node processes this solution is a little bit inefficient. So I decided to rewrite adapter as it worked a couple of versions before, to subscribe and unsubscribe to rooms that I want to. But maybe somehow I'm using socket.io in wrong way. Can you please explain that change? Below in the URL there is my implementation for adapter to subscribe and unsubscribe for rooms that I need at the moment.
Thanks in advance.
The subscriptionMode option allows to configure how many Redis Pub/Sub
channels are used:
- "static": 2 channels per namespace
Useful when used with dynamic namespaces.
- "dynamic": (2 + 1 per public room) channels per namespace
The default value, useful when some rooms have a low number of clients
(so only a few Socket.IO servers are notified).
Related:
- #491
- #492
- #493
Hi There! Recently I'm playing around with upgrading redis adapter and socket IO version an I'm trying to understand one change.
In newer versions we're subscribing to all rooms:
this.subClient.psubscribe(this.channel + "*", onError);
For projects handling hundreds thousands of WS connections with multiple machines and node processes this solution is a little bit inefficient. So I decided to rewrite adapter as it worked a couple of versions before, to subscribe and unsubscribe to rooms that I want to. But maybe somehow I'm using socket.io in wrong way. Can you please explain that change? Below in the URL there is my implementation for adapter to subscribe and unsubscribe for rooms that I need at the moment.
Thanks in advance.
https://pastebin.com/8Gr5hKWw
The text was updated successfully, but these errors were encountered: