Skip to content
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

Remove node-redis from documentation #4845

Closed
nwalters512 opened this issue Oct 6, 2023 · 1 comment
Closed

Remove node-redis from documentation #4845

nwalters512 opened this issue Oct 6, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@nwalters512
Copy link

nwalters512 commented Oct 6, 2023

My team runs multiple servers and uses https://github.com/socketio/socket.io-redis-adapter to ensure messages can be delivered to all clients, no matter which server they're actually connected to. Recently, we got reports from users that updates were not in fact being delivered successfully to clients. After a solid day of debugging, we discovered that our Redis clients were unexpectedly disconnecting from the Redis server. We use node-redis as our Redis client, and by default it should reconnect to the Redis server. It was in fact reconnecting, but after reconnecting, it failed to re-establish the subscription.

This appears to be a well-documented problem with node-redis specifically:

Other folks have moved off node-redis to ioredis because of this (see mastodon/mastodon#25157). ioredis explicitly documents that they restore subscriptions after reconnecting:

When reconnected, the client will auto subscribe to channels that the previous connection subscribed to.

Given that socket.io's Redis adapter relies almost exclusively on pub/sub capabilities of Redis clients, I'd like to propose that socket.io remove node-redis from its documentation in favor of recommending just ioredis. At the very least, a warning about this issue with node-redis should be added.

For reference, here's where this is currently documented: https://socket.io/docs/v4/redis-adapter/.

Perhaps I should have filed this in https://github.com/socketio/socket.io-website. Let me know if that's the case and I can move the issue there.

@nwalters512 nwalters512 added the enhancement New feature or request label Oct 6, 2023
darrachequesne added a commit to socketio/socket.io-website that referenced this issue Mar 15, 2024
@darrachequesne
Copy link
Member

Hi! Thanks for the heads-up 👍

I've added a note in the documentation: https://socket.io/docs/v4/redis-adapter/#with-the-redis-package

@darrachequesne darrachequesne added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants