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

Listening to cluster:slots migrations for pubsub #851

Closed
andrewarrow opened this issue Aug 28, 2018 · 3 comments
Closed

Listening to cluster:slots migrations for pubsub #851

andrewarrow opened this issue Aug 28, 2018 · 3 comments

Comments

@andrewarrow
Copy link

Hello, as I understand pubsub with cluster I need to:

  1. Given a channel, find the the node that owns the hash slot.
  2. Subscribe to that node and also to cluster:slots to detect migrations.
  3. Upon slot migration, subscribe to the channel on the new node and keep the old connection open.
  4. Forward messages to the application from the old connection until it closes and remember those messages.
  5. When migration is complete and the old connection closed, forward messages from the new connection, trimming the remembered messages from the first connection

Does go-redis do this for me already? I was looking through the cluster.go code and I didn’t see this logic specfically. Thanks!

@vmihailenco
Copy link
Collaborator

No, it does not do that. Where can I find docs on cluster:slots channel? I can't google anything related.

@andrewarrow
Copy link
Author

@andrewarrow
Copy link
Author

Also latest info on when/if redis will do this here:
redis/redis#2672

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

No branches or pull requests

2 participants