-
Notifications
You must be signed in to change notification settings - Fork 115
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
Automatically refresh connections to redis cluster on shard/replica addition/deletion #320
Comments
Hi @akshaypatidar1999 thanks for your issue. This is indeed a highly requested feature. We can break the task into 2 areas:
The same, similar logic should also apply to sentinel mode. This also means that the static factories So, we either deprecate the old blocking API or leave it with a warning on the javadoc that that mode will only work for single node or replication mode. |
Is there any plan to pick this feature? |
Are there any plans for implementing this ? I assume the root cause is the same as described here |
@pmlopes @vietj I will happy to contribute to this feature. We have internally created a wrapper over vertx redis client in which we periodically fetch the cluster state using |
@akshaypatidar1999 |
Describe the feature
Refresh connections to redis cluster whenever there is a change in cluster
Current redis client implementation creates connections to redis cluster and uses them to send requests to redis cluster. However if redis cluster is changed (new shards/replicas are added/deleted) then it does not automatically refreshes the connection, due to which we see errors like
MOVED 7652 10.0.4.210:6379
and we have to redeploy our service.If we could somehow detect changes in the cluster and refresh connections then we can get rid of deploying whenver we scale/downscale redis cluster
One simple solution I can think of is to save the cluster information when connecting to cluster for the first time using
CLUSTER INFO/CLUSTER SLOTS
command. Then periodically run this command and if there is any change in the cluster we can refresh the connections.Use cases
Contribution
I am willing to contribute to this feature.
The text was updated successfully, but these errors were encountered: