redis 3.0 cluster 集群 学习之路篇 [3]
# ./redis-trib.rb create --replicas 1 10.1.3.21:8021 10.1.3.22:8022 10.1.3.23:8023 10.1.3.24:8024 10.1.3.25:8025 10.1.3.26:8026>>> Creating cluster
Connecting to node 10.1.3.21:8021: OK
Connecting to node 10.1.3.22:8022: OK
Connecting to node 10.1.3.23:8023: OK
Connecting to node 10.1.3.24:8024: OK
Connecting to node 10.1.3.25:8025: OK
Connecting to node 10.1.3.26:8026: OK
>>> Performing hash slots allocation on 6 nodes...
Using 3 masters:
10.1.3.26:8026
10.1.3.25:8025
10.1.3.24:8024
Adding replica 10.1.3.23:8023 to 10.1.3.26:8026
Adding replica 10.1.3.22:8022 to 10.1.3.25:8025
Adding replica 10.1.3.21:8021 to 10.1.3.24:8024
S: 690bb1a31fff14557483e1e6dea60e5e748fff41 10.1.3.21:8021
replicates 89efca75e220cdeb159e1e4954b953337563683f
S: ae258d0a8e31d2cac64aaad62327ec85c3ce12d7 10.1.3.22:8022
replicates da00c6e9cf5f572396d7cfb006cbcb98e69928ee
S: 8d45084d0ec34c4547c7e57228a5db0ba7eeeba2 10.1.3.23:8023
replicates e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05
M: 89efca75e220cdeb159e1e4954b953337563683f 10.1.3.24:8024
slots:10923-16383 (5461 slots) master
M: da00c6e9cf5f572396d7cfb006cbcb98e69928ee 10.1.3.25:8025
slots:5461-10922 (5462 slots) master
M: e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05 10.1.3.26:8026
slots:0-5460 (5461 slots) master
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 10.1.3.21:8021)
M: 690bb1a31fff14557483e1e6dea60e5e748fff41 10.1.3.21:8021
slots: (0 slots) master
replicates 89efca75e220cdeb159e1e4954b953337563683f
M: ae258d0a8e31d2cac64aaad62327ec85c3ce12d7 10.1.3.22:8022
slots: (0 slots) master
replicates da00c6e9cf5f572396d7cfb006cbcb98e69928ee
M: 8d45084d0ec34c4547c7e57228a5db0ba7eeeba2 10.1.3.23:8023
slots: (0 slots) master
replicates e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05
M: 89efca75e220cdeb159e1e4954b953337563683f 10.1.3.24:8024
slots:10923-16383 (5461 slots) master
M: da00c6e9cf5f572396d7cfb006cbcb98e69928ee 10.1.3.25:8025
slots:5461-10922 (5462 slots) master
M: e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05 10.1.3.26:8026
slots:0-5460 (5461 slots) master
All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
All 16384 slots covered.
# ./redis-trib.rb check 10.1.3.21:8021
Connecting to node 10.1.3.21:8021: OK
Connecting to node 10.1.3.23:8023: OK
Connecting to node 10.1.3.26:8026: OK
Connecting to node 10.1.3.25:8025: OK
Connecting to node 10.1.3.24:8024: OK
Connecting to node 10.1.3.22:8022: OK
>>> Performing Cluster Check (using node 10.1.3.21:8021)
S: 690bb1a31fff14557483e1e6dea60e5e748fff41 10.1.3.21:8021
slots: (0 slots) slave
replicates 89efca75e220cdeb159e1e4954b953337563683f
S: 8d45084d0ec34c4547c7e57228a5db0ba7eeeba2 10.1.3.23:8023
slots: (0 slots) slave
replicates e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05
M: e25ffd0663bf13d5b6aa6a397ffb0c21e4b11e05 10.1.3.26:8026
slots:0-5460 (5461 slots) master
1 additional replica(s)
M: da00c6e9cf5f572396d7cfb006cbcb98e69928ee 10.1.3.25:8025
slots:5461-10922 (5462 slots) master
1 additional replica(s)
M: 89efca75e220cdeb159e1e4954b953337563683f 10.1.3.24:8024
slots:10923-16383 (5461 slots) master
1 additional replica(s)
S: ae258d0a8e31d2cac64aaad62327ec85c3ce12d7 10.1.3.22:8022
slots: (0 slots) slave
replicates da00c6e9cf5f572396d7cfb006cbcb98e69928ee
All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
All 16384 slots covered.
#
页:
[1]