Skip to content
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

New Redis Cluster management strategy #49

Closed
cabol opened this issue Mar 25, 2023 · 0 comments
Closed

New Redis Cluster management strategy #49

cabol opened this issue Mar 25, 2023 · 0 comments
Labels
enhancement New feature or request feature

Comments

@cabol
Copy link
Owner

cabol commented Mar 25, 2023

New Redis Cluster management strategy

Currently, the Redis Cluster setup is very naive, when the cache is started, it tries to get the cluster configuration from Redis and then configure the supervision tree based on it. The problem is it is static once the cache starts, and it doesn't handle cluster changes or "MOVED" errors. The idea is to provide a smarter cluster management strategy able to handle cluster changes as well as "MOVED" errors dynamically.

Strategy highlights

  • A dynamic supervision tree for handling the connection pools to the different master nodes.
  • A configuration manager process in charge of configuring the hash slot map whenever there is a change in the cluster to a "MOVED" error.
  • When the configuration manager runs, it should block all commands execution until the hash slot map is ready to use.
  • Whenever there is a "MOVED" error, the configuration manager is called to re-configure the cluster and once it is done, the failed command is executed again.
  • Remove the :master_nodes option which is quite confusing and use only :conn_opts instead. The idea here is to configure only the configuration endpoint via the :conn_opts; this is where the client should connect to send the "CLUSTER SHARDS" (Redis >= 7) or "CLUSTER SLOTS" (Redis < 7) command to get the cluster information and set it up on the client side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

1 participant