Redis集群配置优化指南

1.安装redis5.x版本

2.配置文件修改,以7001节点为例

bind 127.0.0.1
# 关闭保护模式,可以公网访问
protected-mode no
# 端口号
port 7001
# 启动cluster
cluster-enabled yes
# 当前节点的集群信息
cluster-config-file nodes-7001.conf
# 连接超时
cluster-node-timeout 5000
# 是否在每次更新操作后进行日志记录
appendonly yes
# windows前台启动
daemonize no
# redis节点密码,所有节点应当一样
requirepass 123456
# 连接主节点密码
masterauth 123456
# 目录
dir D:/install/Redis/cluster/7001/

3.启动7001-7006 (替换7001)

redis-server.exe D:\install\Redis\cluster\7001\redis.conf

4.启动集群 注意 -a 是密码

redis-cli --cluster create -a 123456 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006 --cluster-replicas 1

参考

1.https://blog.csdn.net/u013737132/article/details/133410293

2.https://www.cnblogs.com/LiShuaiForAll/p/19145888

3.密码,hash槽出错:https://blog.csdn.net/key_768/article/details/108018584

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值