You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.
I am trying to work with a cluster configuration, but my code is getting complicated fast when I try to handle key redirects for other cluster hosts. Right now I have to perform the operation, and then check to see if the reply was an error type and then parse the string for the MOVED, or ASK contents, and finally do the connection to the new host/port and submit the query.
Now I understand that because everything is async that making the connection to the new server is probably not easy. If at least there was a reply type of redirect that might make things easier to handle. It would at least remove the parsing step.
One other approach might be adding a callback for the -ASK/-MOVED errors that can update an LRU cache of connections related to those keys. Either way, it seems dealing with the responses on every command invocation response is quite painful as is.
That being said, if I am "doing it wrong" please suggest a more practical approach.
Thanks!
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am trying to work with a cluster configuration, but my code is getting complicated fast when I try to handle key redirects for other cluster hosts. Right now I have to perform the operation, and then check to see if the reply was an error type and then parse the string for the MOVED, or ASK contents, and finally do the connection to the new host/port and submit the query.
Now I understand that because everything is async that making the connection to the new server is probably not easy. If at least there was a reply type of
redirect
that might make things easier to handle. It would at least remove the parsing step.One other approach might be adding a callback for the
-ASK
/-MOVED
errors that can update an LRU cache of connections related to those keys. Either way, it seems dealing with the responses on every command invocation response is quite painful as is.That being said, if I am "doing it wrong" please suggest a more practical approach.
Thanks!
The text was updated successfully, but these errors were encountered: