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

Improve configuration for Redis Cluster mode #47

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

Improve configuration for Redis Cluster mode #47

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

Comments

@cabol
Copy link
Owner

cabol commented Mar 13, 2023

The current config for Redis Cluster uses the :master_nodes and :conn_opts options, but it is quite confusing how they work. The goal is to simplify it by using only :conn_opts.

The :conn_opts option

For Redis Cluster mode,:conn_opts will define the Redis client options but for the configuration endpoint. 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.

The :override_master_host option

Defines whether the given master host should be overridden with the configuration endpoint or not. Defaults to false. By default, the adapter uses the host returned by the "CLUSTER SHARDS" (Redis >= 7) or "CLUSTER SLOTS" (Redis < 7) command. One may consider set it to true for tests when using Docker for example, or when Redis nodes are behind a load balancer that Redis doesn't know the endpoint of. See Redis docs for more information.

@cabol cabol added the enhancement New feature or request label Mar 13, 2023
@cabol cabol closed this as completed Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant