Redis笔记整理(二):Java API使用与Redis分布式集群环境搭建
$ src/redis-trib.rb create --replicas 1 192.168.56.101:7000 192.168.56.101:7001 192.168.56.101:7002 192.168.56.101:7003 192.168.56.101:7004 192.168.56.101:7005 >>> Creating cluster>>> Performing hash slots allocation on 6 nodes...
Using 3 masters:
192.168.56.101:7000
192.168.56.101:7001
192.168.56.101:7002
Adding replica 192.168.56.101:7003 to 192.168.56.101:7000
Adding replica 192.168.56.101:7004 to 192.168.56.101:7001
Adding replica 192.168.56.101:7005 to 192.168.56.101:7002
M: 497bce5118057198afb0511cc7b88479bb0c3938 192.168.56.101:7000
slots:0-5460 (5461 slots) master
M: f0568474acad5c707f25843add2d68455d2cbbb2 192.168.56.101:7001
slots:5461-10922 (5462 slots) master
M: ebe86ea74af5612e6393c8e5c5b3363928a4b7b2 192.168.56.101:7002
slots:10923-16383 (5461 slots) master
S: c99c55ab3fcea2d65ca3be5b4786390a6e463ea2 192.168.56.101:7003
replicates 497bce5118057198afb0511cc7b88479bb0c3938
S: 0a847801493a45d32487d701cd0fe37790d4b2f9 192.168.56.101:7004
replicates f0568474acad5c707f25843add2d68455d2cbbb2
S: 7f9e4bec579fda23a574a62d362a04463140bbc2 192.168.56.101:7005
replicates ebe86ea74af5612e6393c8e5c5b3363928a4b7b2
Can I set the above configuration? (type 'yes' to accept): yes
>>> Nodes configuration updated
>>> Assign a different config epoch to each node
>>> Sending CLUSTER MEET messages to join the cluster
Waiting for the cluster to join......
>>> Performing Cluster Check (using node 192.168.56.101:7000)
M: 497bce5118057198afb0511cc7b88479bb0c3938 192.168.56.101:7000
slots:0-5460 (5461 slots) master
M: f0568474acad5c707f25843add2d68455d2cbbb2 192.168.56.101:7001
slots:5461-10922 (5462 slots) master
M: ebe86ea74af5612e6393c8e5c5b3363928a4b7b2 192.168.56.101:7002
slots:10923-16383 (5461 slots) master
M: c99c55ab3fcea2d65ca3be5b4786390a6e463ea2 192.168.56.101:7003
slots: (0 slots) master
replicates 497bce5118057198afb0511cc7b88479bb0c3938
M: 0a847801493a45d32487d701cd0fe37790d4b2f9 192.168.56.101:7004
slots: (0 slots) master
replicates f0568474acad5c707f25843add2d68455d2cbbb2
M: 7f9e4bec579fda23a574a62d362a04463140bbc2 192.168.56.101:7005
slots: (0 slots) master
replicates ebe86ea74af5612e6393c8e5c5b3363928a4b7b2
All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
All 16384 slots covered.
页:
[1]