-
Notifications
You must be signed in to change notification settings - Fork 1.5k
add a new cluster kind for redis-cluster-proxy #1425
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…milar to twemproxy
|
@mgravell Hello, I'm the developer of Redis Cluster Proxy, thank you for trying it. As for
|
Collaborator
Collaborator
Author
|
Consencus is that this proxy failed to launch; community guidance (there are literally no official responses) from here RedisLabs/redis-cluster-proxy#81 (comment) is to look to envoy instead, which is already covered above. Closing this. |
NickCraver
added a commit
that referenced
this pull request
Feb 10, 2022
Merged
NickCraver
added a commit
that referenced
this pull request
Feb 22, 2022
Envoy proxy for redis: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/other_protocols/redis Envoy does the heavy lifting of redis cluster instance discovery and partitioning commands among redis cluster instances from the clients to a set of proxy instances. Clients can round robin or randomly select a proxy to connect to and the proxy will do the right thing of picking the right cluster instance for a given command. Apart from the glue of wiring up the new proxy in Enums and disabling pub/sub for the proxy (similar to Twemproxy), this PR contains the following major change in the primary node selection; When an envoy proxy mode is selected for connection, the check for verifying if the node is master or replica is disabled. In the envoy proxy world we can connect to any proxy instance. All we care about here is ensuring that the load is balanced between the proxy instances (which is accomplished through the current round-robin logic). @mgravell raised a valid point offline that the order of operations wouldn't be guaranteed in this mode and this is indeed one of the limitation of this approach. The commands that form the foundation for redis transactions (exec, discard, multi, watch, unwatch) (https://redis.io/topics/transactions) are not supported by Envoy (https://github.com/envoyproxy/envoy/blob/main/source/extensions/filters/network/common/redis/supported_commands.h) and hence added to the exclusion list in PR. The testing is inspired from this PR: #1425. Open to suggestions on that. Co-authored-by: Nick Craver <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
in most ways it is similar to twemproxy, and you can make it just about work by manually configuring things in the config, but this makes everything better integrated, so all you need to do is use a config like
"127.0.0.1,proxy=RedisClusterProxy", and everything else clicks into place automatically.In particular:
work todo:
PROXY MULTIPLEXING onMULTIresetsMULTIPLEXINGafterwards (it disables it during)*SCANcursor change(it turns out that
PROXY MULTIPLEXING onisn't a thing; it is on by default, and you can turn it off, or it gets turned off when you do the firstMULTI; conclusion: just let the server worry about it)