Skip to content

Subscribe only to known room to reduce redis traffic #486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

realturner
Copy link

Hi,

We have a project using multiple server instance with lots of users attempting to send messages to each other, making lots of rooms of small amount of members per room. By examining the source code, I think replacing redis command psubscribe to subscribe of specific rooms can help reduce traffic that some server instance may not have such room to be processed.

From our experiment running on production environment, it helped us reduce 50% of redis outgoing bandwidth. If this idea seems making sense to you, please consider merging.

Best,
Tso-Shuo Tsao

@darrachequesne
Copy link
Member

Hi! Thanks for the pull request.

Actually, it was implemented like that in the past, see:

@realturner
Copy link
Author

Hi! Thanks for your reply.

I didn't know that designing adapter with pub/sub requires many considerations and had already been discussed before. That's quite exciting for me that I am not the only one encountering similar issue, but also makes me being sorry for not investigating enough before sending PR. 😅 .

I haven't yet going through all details you mentioned, but I do see your latest comments in #207. I believe there is a reason for the removal of withChannelMultiplexing option so we should better not to merge this.

I'll close this PR.

Best,
Tso-Shuo Tsao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants