Manual control connect or disconnect behavior at runtime #2398
Unanswered
jiayuzhang
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, we have a service to migrate from cluster A to cluster B, both clusters will establish a lot of Redis connections (>20k), we have bumped the conn limit on the Redis side, but the latency/performance is degraded.
One idea is, while we migrate traffic from A to B, we could notify instances in cluster A (e.g. via API) to disconnect, later if something bad happens, we could ask A to reconnect, and route traffic back.
Wrt reconnect/disconnect, one naive way is we can manually call the client.connect() and redisConn.close(), but there could be race conditions while we route traffic back during re-connecting, so we probably need some locks to let caller waits until the client finishes re-connect.
I'm wondering if there is a better way Lettuce can provide. thanks
Beta Was this translation helpful? Give feedback.
All reactions