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