-
Notifications
You must be signed in to change notification settings - Fork 687
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] CLUSTER CONFIG-SET command to set config to the entire cluster. #1193
Comments
I think this is useful. I think it should also include ACLs as well. This has been a discussion point for cluster v2 for awhile, we should decide if legacy cluster should get it as well. Some questions:
|
I was also thinking about a API to set cluster-wide configs and the mechanism to build this. In the existing state of things, how do we ensure which node has the latest value of the config and how other node fetch and apply it? @dmitrypol I think you're all interested in this. |
(2) relies on a external entity which can coordinate and determine the version to be used while updating a config value. This entity also can set this config on a subset of nodes (instead of just one node) for better reliability. If there is a need for this config to be quickly propagated, a node can also broadcast this new config when an admin sets the config payload with a newer version. WDYT? |
Thank you everyone for the review and response!
The config file would be better place as similar to normal config set and rewrite commands, with this approach I think we will not create another overhead for maintainance. To propagate the configs: I think that we take reference of how sentinel re-writes the replicaof config when the switch-over takes place, similarly we can send the specific config to every node in the cluster as part of gossip. (Other possible approach is that we can create a fake client and send the config).
we can add
Case1: If the config is needed to be updated during run time with config set in cluster mode and admin thinks that the config should be consistent across the nodes then it would be propagated entire cluster by using the cluster config-set command instead of regular config set. @madolson @hpatro @nandihalli This is just the beginning of the idea, and we need to implement the feature. Please feel free to share any other approaches or suggestions you might have. |
Maybe we can execute config set command in all other nodes to implement Generally, the ACL configuration of all nodes in the cluster is the same. We can use the ACL configuration of this node to access other nodes and execute the command. |
In fact, I believe this is an issue of information synchronization within the cluster, including but not limited to configuration, ACL, slot distribution, and cluster roles. In Cluster v2, there should be a central configuration storage that maintains global consistency by having each node either pull or receive updates via push notifications. |
Hi @wuranxx , Thank you for the suggestions and I will consider these points for the implementation. |
The problem/use-case that the feature addresses
Implement a
CLUSTER CONFIG-SET
command that allows for consistent configuration across all nodes in the cluster. Currently, configurations must be set individually on each node. There is a chance of some configs could break the cluster so this command should be have list of configs which should not be propagated.Description of the feature
Implement a command as follows which allows the clients to set config entire cluster consistently.
CLUSTER CONFIG-SET <option> <value> ..
As mentioned above there is a chance setting some configs like
port
orbind
config would break the cluster so the command should be smart enough to detect the config to set the entire cluster. This command would help where the cases like: settingmaxmemory
config to be consistent in every node and it would be helpfull if we have a command which set all the node in cluster where the config value to be consistent.Alternatives you've considered
Implement a script which can set the config each node on the cluster and set independently and verify later. or use any config monitor tools to do the same.
The text was updated successfully, but these errors were encountered: