Redis高可用三(Redis Cluster集群)


Redis高可用三(Redis Cluster集群)

参考博文1:https://blog.csdn.net/qq_40298351/article/details/102669146
参考博文2:https://www.cnblogs.com/renpingsheng/p/9813959.html
参考博文3:https://www.cnblogs.com/renpingsheng/p/9862485.html
1、redis.conf配置
cluster-enabled yes
cluster-config-file nodes-6380.conf
cluster-node-timeout 15000
2、重启redis
3、加入Cluster
src/redis-cli --cluster create 127.0.0.1:6380 127.0.0.1:6381 127.0.0.1:6382 127.0.0.1:6383 127.0.0.1:6384 127.0.0.1:6385  # 每个节点的IP:PORT
4、查看Cluster情况
src/redis-cli --cluster info 127.0.0.1:6380  # 任意一个节点的IP:PORT
5、加入新节点
src/redis-cli --cluster add-node 127.0.0.1:6386 127.0.0.1:6380  # 前面的IP:PORT 为新加入的节点
6、重设卡槽slots
src/redis-cli --cluster reshard 127.0.0.1:6380  # 重设节点slots


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM