Redis集群配置优化指南

1.安装redis5.x版本

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

bash 复制代码
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

相关推荐
CodeCipher9 小时前
关于Redis单线程问题
数据库·redis·缓存
企鹅郁金香9 小时前
Gitlab和Gerrit部署后的工作(二)
数据库·gitlab·gerrit域名无法修改·激活gitlab·gitlab注册ldap·nginx反向代理gitlab·nginx反向代理gerrit
悄悄敲敲敲9 小时前
MySQL表的内外连接
数据库·mysql
kaico20189 小时前
MYSQL的各版本对比
数据库·mysql
zgl_200537799 小时前
ZGLanguage 解析SQL数据血缘 之 Python提取SQL表级血缘树信息
大数据·数据库·数据仓库·hive·hadoop·python·sql
rgeshfgreh10 小时前
Python函数全解析:定义、参数与作用域
前端·数据库·python
亮子AI10 小时前
【MySQL】node.js 如何判断连接池是否正确连接上了?
数据库·mysql·node.js
Chef_Chen10 小时前
数据科学每日总结--Day41--ubuntu安装tailscale
数据库·ubuntu·postgresql
a程序小傲10 小时前
【Node】单线程的Node.js为什么可以实现多线程?
java·数据库·后端·面试·node.js