redis - Redis 6 中主副本同步需要哪些 ACL 命令?
问题描述
在集群环境中使用 ACL 配置 Redis 6 时,必须创建一个额外的用户(假设不需要默认用户或无权访问 PSYNC 命令)。必须分配给该用户的确切命令是什么?
文档中有一个关于Sentinel 和副本的 ACL 规则 的小说明,表明 Sentinel 需要:
AUTH、客户端、订阅、脚本、发布、PING、INFO、MULTI、SLAVEOF、配置、客户端、执行
和副本需要:
PSYNC、REPLCONF、PING
我最好的猜测是将两者结合为一个命令集:
AUTH、客户端、订阅、脚本、发布、PING、INFO、MULTI、SLAVEOF、配置、客户端、执行、PSYNC、REPLCONF
摘自 redis.conf 表明“和/或复制所需的其他命令”:
# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the replica to authenticate before
# starting the replication synchronization process, otherwise the master will
# refuse the replica request.
#
masterauth mymasterpassword
#
# However this is not enough if you are using Redis ACLs (for Redis version
# 6 or greater), and the default user is not capable of running the PSYNC
# command and/or other commands needed for replication. In this case it's
# better to configure a special user to use with replication, and specify the
# masteruser configuration as such:
#
masteruser mymasteruser
#
# When masteruser is specified, the replica will authenticate against its
# master using the new AUTH form: AUTH <username> <password>.
解决方案
推荐阅读
- html - 无法让数据跨越正确的列数
- javascript - 使用 ID 交换两个 DIV 的位置
- html - 如何使边框半径框中的文本居中
- javascript - Promise 用于异步渲染,但导航后不会保持解析
- cdi - Deltaspike 服务层捕获 PersistenceException 意外行为
- shell - 如何使用 xamarin 表单跨平台在 shell 选项卡栏中创建列表视图导航?
- amazon-web-services - 具有条件的 CDK 应用程序的 IAM 权限边界
- docker-compose - SpringBoot App无法连接到docker中的MySQL
- javascript - 如何让谷歌图表识别这个 json
- css - 如何修复 eslint/prettier “解析错误:';' .css 文件的“预期”?