-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature Request: DB selection support for proxy-bridged cluster #2642
Comments
Which, exactly? You say something can be repro'd, but: we can't repro anything without knowing what server configuration is required. Is this redislabs/redis-cluster-proxy (which seems to be pretty idle in terms of GitHub)? Or is this some other setup that spoofs the redis-cluster feature on top of a different shard model? How does this cluster bridge identify itself? This is an important question because "normal" cluster doesn't support multiple databases, so we disable the feature in the client. Perhaps alternatively; if everything is going to be routed via the proxy, maybe we don't even need to know.that it is in cluster mode - deferring all of that to the proxy, in which case we need to know how it identified itself simply so we can ignore the cluster aspect. However, the most interesting thing for me here is that you say you're getting a timeout when changing database, but: I would expect GetDatabase to fail if we detected cluster mode - so this seems to be a different failure mode, and not one that the library is forcing. Alternatively, if we didn't identify a cluster, I would expect everything to work already. But: I can do precisely zero to investigate any of this without knowing exactly what server/proxy setup you have here. |
Hi, thanks for the quick response! It could be late at night... Most of the Redis SDK doesn't support standalone-cluster auto-nego well so cloud vendors are spending times on it. It looks that AWS is supporting unsharded-cluster mode to support user scale their Redis recently, meanwhile alibaba uses proxy to scale. The issue happened when user scale a standalone mode to proxy-bridged cluster. It worked like:
For user land, when VIP is switched, all links to VIP will be killed, so user app with SDK will encounter a link bounce. We are still investigating the timeout issue when switch is done, current debug shows when switch to a cluster mode, some exceptions could be handled inside silently so user get a timeout. It is still unknown that if the client is re-configured into a cluster mode because in wireshark we saw "SELECT" went out and "+OK" returned. Yes I totally agree that the rejection of SELECT in cluster mode is also a good option with fast failure. In test we found that SELECT can be sent but not well handled. @yangbodong22011(Jedis Reviewer) is working on it now, we will provide test environment. It is also hoped that the db selection in cluster should not be a vendor specific SDK feature, we just try to find a way to enable it gracefully in cluster mode. Proxy can be fixed to adapt to auto-negotiation way, which we can propose to the Redis community. @soloestoy We will keep you updated about the debugging, hope you get us well. Thanks again. |
@mgravell Hi, sorry for the bother. I think maybe I find the reason. The variable The reason for this is that we catch the exception but return I'm new here. Is this by design or a bug? |
If If someone can provide a server endpoint to test against, we can say more. |
@mgravell I sent you the test environment address via slack, please check it. |
Thanks for providing a suitable validation environment; this isn't a "normal" redis configuration, and a reasonable argument could be made that this is a bug in their proxy (it shouldn't positively respond to |
* fix #2642 1: don't treat trivial clusters as clusters - Alibaba uses this config 2: report synchronous failures immidiately and accurately * instead of using node count, use explicit tracking of the DB count * release notes
fix merged; should have new release soon; preview is on myget, 2.7.20 or higher from nuget feed |
It passed our test and work well now. |
Description:
Some of the Proxy-bridged cluster can support multiple db selection.
In order to give full support of advanced features, the proxy-bridged cluster worked as a single node cluster that:
in that mode, it can give the compatibility at best effort and user could write same code for standalone mode or cluster mode, especially when user scales standalone mode to cluster, with db selection data inside.
An unhandled timeout exception was encountered when doing db selection in cluster mode in some early version of the library, and we tried the latest package 2.7.17 but also failed.
the case can be reproduced by using code below,
Thanks,
Baron
The text was updated successfully, but these errors were encountered: