Redis5 创建集群
./src/redis-cli -a zzs888 –cluster create 172.16.164.31:8001 172.16.164.31:8002 172.16.164.31:8003 172.16.164.31:8004 172.16.164.31:8005 172.16.164.31:8006 –cluster-replicas 1
其实我一直在你身边
./src/redis-cli -a zzs888 –cluster create 172.16.164.31:8001 172.16.164.31:8002 172.16.164.31:8003 172.16.164.31:8004 172.16.164.31:8005 172.16.164.31:8006 –cluster-replicas 1
./src/redis-trib.rb set-timeout 114.55.116.177:8002 4000
./src/redis-trib.rb del-node 114.55.116.177:8011 d15d12ebd2c9f26c0842972388b140fe8b99663c
./src/redis-trib.rb add-node –slave –master-id 2be98baec0311e499a3aca1726aba895a1f15c1e 114.55.116.177:8011 114.55.116.177:8001
./src/redis-trib.rb check 114.55.116.177:8002
./src/redis-trib.rb fix 114.55.116.177:8003
./src/redis-trib.rb rebalance –use-empty-masters –pipeline 100 –simulate 114.55.116.177:8002
./src/redis-trib.rb rebalance –use-empty-masters –pipeline 100 114.55.116.177:8002
./src/redis-trib.rb add-node 114.55.116.177:8013 114.55.116.177:8001 (新增集群8013master节点)
./src/redis-trib.rb reshard 114.55.116.177:8013(为8013master节点重新分配slot)
./src/redis-trib.rb check 114.55.116.177:8004 (重新check检查集群,8001节点减少1500个slots,8013节点增加1500个slot)
./src/redis-trib.rb add-node 114.55.116.177:8010 114.55.116.177:8001
./src/redis-trib.rb add-node –slave –master-id 4e6ac38201943a070d65dc7c489e334cb7cf9bc6 114.55.116.177:8010 114.55.116.177:8001
命令格式:ruby redis-trib.rb info host:port
./src/redis-trib.rb info 114.55.116.177:8001
./src/redis-trib.rb check 114.55.116.177:8001
#/opt/redis-3.0.6/src/redis-trib.rb create –replicas 2 114.55.116.177:8001 114.55.116.177:8002 114.55.116.177:8003 114.55.116.177:8004 114.55.116.177:8005 114.55.116.177:8006 114.55.116.177:8007 114.55.116.177:8008 114.55.116.177:8009