-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support standalone Redis (non-cluster) #27
Comments
@zuiderkwast is it possible to connect to a standalone node, with PR #41 ? |
Even without #41, it's possible to connect to a single node using the It's not possible to use a standalone instance as if it were a cluster though, with the same functions, but actually I don't think we want to do this automatically. Cluster and standalone deployments are very different. Standalone mode allows SELECT and cross-slot commands, for example, which are forbidden in cluster mode. |
@zuiderkwast Thanks a lot for your useful information! Currently we're using eredis in VerneMQ so we cannot connect to a Redis cluster yet. And ered's stated goal is to replace both previous libraries, isn't it. In any case, I'll try to do some testing based on your suggestions. |
Yes, ered implements the functionality for single instance and cluster, but the API has a preference for cluster. This was done before I was the maintainer of this project. Now, I've been trying to make the API look nice for single instance too. An idea: We use a tuple like I've been busy with other work though. |
@zuiderkwast I suppose the client always knows whether it's connecting to a standalone or a cluster. Your suggestion sounds great to me, in any case! |
I've now written my plugin using |
It would be possible to auto-detect, but I think it's better that users connect explicitly to cluster or standalone. I'm thinking |
Sounds great. That interface is perfect at least for me, as the client (the plugin) always knows whether it connects to a cluster or not. |
It is useful for developers if the same client can connect to a standalone node, not only a cluster. For this, we need to handle an error response form CLUSTER SLOTS and handle this as if the whole cluster is handled by a single node.
The requirement that the cluster needs to have at least two masters for 'cluster_ok' may need to be reconsidered.
The text was updated successfully, but these errors were encountered: