~~~~~~~~~~~~~~~~~~~~~~~~~一些概念,请忽略~~~~~~~~~~~~~~~~~~~~~~~
mysql数据库的引擎为innondb
IOE:IBM,PRACLE,emc(商用数据库)
“IOE” 是对IBM、Oracle、EMC的简称,其中IBM代表硬件以及整体解决方案服务商,Oracle代表数据库,EMC代表数据存储。
慢查询,
对数据库的优化有那些
数据库备份:perconed ,一般是热备份
mysqldump有个坑:数据库备份的时候会删除原来数据库东西,需要锁表(只允许查询),备份完了需要查询是否可以使用备份的数据
redis:持久化(比memecha),快,用于微博,点赞,销售秒杀,操作都在内核。健-值,存于列表。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
systemctl stop mysqld
systemctl disable mysqld
server1 172.25.85.1 主redis
server1 172.25.85.1 从redis
server1 172.25.85.1 从redis
tar zxf redis-5.0.3.tar.gz
yum install gcc -y
cd redis-5.0.3
make && make install
同步软件工具
yum install rsync -y
rsync -a redis-5.0.3 server2:
rsync -a redis-5.0.3 server3:
cd utils/
./install_server.sh
vim /etc/redis/6379.conf
bind 0.0.0.0 ##作用于所有ip
databases 16 ##默认数据库为16
systemctl restart redis_6379
vim /etc/redis/6379.conf
bind 0.0.0.0
databases 16
slaveof 172.25.38.1 6379 ##编写主从复制
systemctl restart redis_6379
[root@server1 ~]# redis-cli
127.0.0.1:6379> set name ccj
OK
127.0.0.1:6379> exit
[root@server1 ~]# redis-cli
127.0.0.1:6379> info replication
# Replication
role:master
connected_slaves:1
slave0:ip=172.25.38.2,port=6379,state=online,offset=1260,lag=0
master_replid:c0f467f423b81fa86d2ea3eb5d8c37bb8083abcd
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:1260
second_repl_offset:-1
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:1260
[root@server1 ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 6464/redis-server 1
[root@server2 ~]# redis-cli
127.0.0.1:6379> get name
"ccj"
cd/var/lib/redis/6379
ls
rdb 内存快照,只保存现有的内存值,数据量小
aof 内存里面的所有变更,不断追加,数据量大,详细
cd redis-5.0.3
cp sentinel.conf /etc/redis/
cd /etc/redis/
vim sentinel.conf
protected-mode no ##关闭保护模式
sentinel monitor mymaster 172.25.38.1 6379 2 ##设置主redis,投票机制为2票通过
sentinel down-after-milliseconds mymaster 10000 ##荡机10秒切换主从
[root@server1 redis]# scp sentinel.conf server2:/etc/redis/
sentinel.conf 100% 9710 9.5KB/s 00:00
[root@server1 redis]# scp sentinel.conf server3:/etc/redis/
sentinel.conf 100% 9710 9.5KB/s
[root@server1 redis]# redis-server /etc/redis/sentinel.conf --sentinel
7798:X 28 Feb 2019 11:31:00.045 # +monitor master mymaster 172.25.38.1 6379 quorum 2
7798:X 28 Feb 2019 11:31:00.046 * +slave slave 172.25.38.2:6379 172.25.38.2 6379 @ mymaster 172.25.38.1 6379
7798:X 28 Feb 2019 11:31:00.078 * +slave slave 172.25.38.3:6379 172.25.38.3 6379 @ mymaster 172.25.38.1 6379
[root@server2 ~]# redis-server /etc/redis/sentinel.conf --sentinel
6715:X 28 Feb 2019 11:32:13.121 # +monitor master mymaster 172.25.38.1 6379 quorum 2
6715:X 28 Feb 2019 11:32:13.123 * +slave slave 172.25.38.2:6379 172.25.38.2 6379 @ mymaster 172.25.38.1 6379
6715:X 28 Feb 2019 11:32:13.143 * +slave slave 172.25.38.3:6379 172.25.38.3 6379 @ mymaster 172.25.38.1 6379
6715:X 28 Feb 2019 11:32:13.978 * +sentinel sentinel f048ac08dac9c9abc7b1366812374a493ba7d3c4 172.25.38.1 26379 @ mymaster 172.25.38.1 6379
[root@server3 ~]# redis-server /etc/redis/sentinel.conf --sentinel
7040:X 28 Feb 2019 11:32:44.484 # +monitor master mymaster 172.25.38.1 6379 quorum 2
7040:X 28 Feb 2019 11:32:44.486 * +slave slave 172.25.38.2:6379 172.25.38.2 6379 @ mymaster 172.25.38.1 6379
7040:X 28 Feb 2019 11:32:44.518 * +slave slave 172.25.38.3:6379 172.25.38.3 6379 @ mymaster 172.25.38.1 6379
7040:X 28 Feb 2019 11:32:45.024 * +sentinel sentinel 426626fcf1cb6e5d92cc74f05b7676eeb291aec4 172.25.38.2 26379 @ mymaster 172.25.38.1 6379
7040:X 28 Feb 2019 11:32:46.031 * +sentinel sentinel f048ac08dac9c9abc7b1366812374a493ba7d3c4 172.25.38.1 26379 @ mymaster 172.25.38.1 6379
[root@server1 ~]# redis-cli
127.0.0.1:6379> shutdown
7798:X 28 Feb 2019 11:32:14.602 * +sentinel sentinel 426626fcf1cb6e5d92cc74f05b7676eeb291aec4 172.25.38.2 26379 @ mymaster 172.25.38.1 6379
7798:X 28 Feb 2019 11:32:46.429 * +sentinel sentinel 60f74aa622ee508c495d88ec6628d33ad989c812 172.25.38.3 26379 @ mymaster 172.25.38.1 6379
7798:X 28 Feb 2019 11:34:32.098 # +sdown master mymaster 172.25.38.1 6379 ##主观荡机
7798:X 28 Feb 2019 11:34:32.150 # +odown master mymaster 172.25.38.1 6379 #quorum 2/2 ##投票机制
7798:X 28 Feb 2019 11:34:32.150 # +new-epoch 1
7798:X 28 Feb 2019 11:34:32.150 # +try-failover master mymaster 172.25.38.1 6379
7798:X 28 Feb 2019 11:34:32.778 # +vote-for-leader f048ac08dac9c9abc7b1366812374a493ba7d3c4 1
7798:X 28 Feb 2019 11:34:32.780 # 60f74aa622ee508c495d88ec6628d33ad989c812 voted for 60f74aa622ee508c495d88ec6628d33ad989c812 1
7798:X 28 Feb 2019 11:34:32.836 # 426626fcf1cb6e5d92cc74f05b7676eeb291aec4 voted for 60f74aa622ee508c495d88ec6628d33ad989c812 1
7798:X 28 Feb 2019 11:34:33.241 # +config-update-from sentinel 60f74aa622ee508c495d88ec6628d33ad989c812 172.25.38.3 26379 @ mymaster 172.25.38.1 6379
7798:X 28 Feb 2019 11:34:33.241 # +switch-master mymaster 172.25.38.1 6379 172.25.38.3 6379
7798:X 28 Feb 2019 11:34:33.242 * +slave slave 172.25.38.2:6379 172.25.38.2 6379 @ mymaster 172.25.38.3 6379
7798:X 28 Feb 2019 11:34:33.242 * +slave slave 172.25.38.1:6379 172.25.38.1 6379 @ mymaster 172.25.38.3 6379
7798:X 28 Feb 2019 11:34:43.245 # +sdown slave 172.25.38.1:6379 172.25.38.1 6379 @ mymaster 172.25.38.3 6379
[root@server1 ~]# vim /etc/redis/sentinel.conf
编辑
slaveof 172.25.38.3 6379
[root@server1 ~]# systemctl restart redis_6379
[root@server1 ~]# redis-cli
127.0.0.1:6379> info replication
# Replication
role:slave
master_host:172.25.38.3
master_port:6379
master_link_status:up
master_last_io_seconds_ago:1
master_sync_in_progress:0
slave_repl_offset:110746
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:a28fcf7cba6aec9881767252617c0e6a4fbead34
master_replid2:c0f467f423b81fa86d2ea3eb5d8c37bb8083abcd
master_repl_offset:110746
second_repl_offset:34582
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:34582
repl_backlog_histlen:76165
[root@server1 ~]# redis-cli -h 172.25.38.2 -p 6379
172.25.38.2:6379> info replication
# Replication
role:slave
master_host:172.25.38.3
master_port:6379
master_link_status:up
master_last_io_seconds_ago:1
master_sync_in_progress:0
slave_repl_offset:138890
slave_priority:100
slave_read_only:1
connected_slaves:0
master_replid:a28fcf7cba6aec9881767252617c0e6a4fbead34
master_replid2:c0f467f423b81fa86d2ea3eb5d8c37bb8083abcd
master_repl_offset:138890
second_repl_offset:34582
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:1
repl_backlog_histlen:138890
[root@server1 ~]# redis-cli -h 172.25.38.3 -p 6379
172.25.38.3:6379> info replication
# Replication
role:master
connected_slaves:2
slave0:ip=172.25.38.2,port=6379,state=online,offset=131299,lag=0
slave1:ip=172.25.38.1,port=6379,state=online,offset=131162,lag=0
master_replid:a28fcf7cba6aec9881767252617c0e6a4fbead34
master_replid2:c0f467f423b81fa86d2ea3eb5d8c37bb8083abcd
master_repl_offset:131299
second_repl_offset:34582
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:5237
repl_backlog_histlen:126063
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim /etc/redis/6379.conf
458 min-replicas-to-write 1 ##主机必须连接一个从数据库,否则无法写
459 min-replicas-max-lag 10
systemctl restart redis_6379
127.0.0.1:6379> shutdown
not connected>
127.0.0.1:6379> set name 123
(error) NOREPLICAS Not enough good replicas to write.
vm.overcommit_memory用来设置内存分配策略,有三个可选值:
[root@server1 ~]# sysctl vm.overcommit_memory
vm.overcommit_memory = 0
[root@server1 ~]# sysctl -w vm.overcommit_memory=1
vm.overcommit_memory = 1
[root@server1 ~]# sysctl vm.overcommit_memory
vm.overcommit_memory = 1
mkdir /usr/local/rediscluster
cd /usr/local/rediscluster/
ls
mkdir 700{1..6}
ls
cd 7001
vim redis.conf
编辑如下
port 7001
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
pidfile "/usr/local/rediscluster/7001/redis.pid"
logfile "/usr/local/rediscluster/7001/redis.log"
daemonize yes
dir "/usr/local/rediscluster/7001"
redis-server redis.conf ##开启服务
cp redis.conf ../7002
cp redis.conf ../7003
cp redis.conf ../7004
cp redis.conf ../7005
cp redis.conf ../7006
cd ..
cd 7002
ls
vim redis.conf
编辑如下:替换7001为7002
%s /7001/7002/g
下面依次修改7003,7004,7005,7006的配置文件,并开启
ps ax
7079 ? Ssl 0:00 redis-server *:7001 [cluster]
7086 ? Ssl 0:00 redis-server *:7002 [cluster]
7092 ? Ssl 0:00 redis-server *:7003 [cluster]
7098 ? Ssl 0:00 redis-server *:7004 [cluster]
7104 ? Ssl 0:00 redis-server *:7005 [cluster]
7110 ? Ssl 0:00 redis-server *:7006 [cluster]
redis-cli --cluster create --cluster-replicas 1 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006
[root@server1 7006]# redis-cli --cluster info 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7002 (1ea0f9bf...) -> 0 keys | 5462 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
[OK] 0 keys in 3 masters.
0.00 keys per slot on average.
[root@server1 7006]# redis-cli -c -p 7001
127.0.0.1:7001> set name ccj
-> Redirected to slot [5798] located at 127.0.0.1:7002
OK
127.0.0.1:7002> get name
"ccj"
127.0.0.1:7002>
[root@server1 7006]# redis-cli -c -p 7006
127.0.0.1:7006> get name
-> Redirected to slot [5798] located at 127.0.0.1:7002
"ccj"
127.0.0.1:7002>
127.0.0.1:7002> SHUTDOWN
not connected> exit
[root@server1 7006]# redis-cli --cluster info 127.0.0.1:7001
Could not connect to Redis at 127.0.0.1:7002: Connection refused
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 1 keys | 5462 slots | 0 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
[OK] 1 keys in 3 masters.
0.00 keys per slot on average.
[root@server1 7006]# redis-cli -c -p 7001
127.0.0.1:7001> get name
-> Redirected to slot [5798] located at 127.0.0.1:7006
"ccj"
127.0.0.1:7006> SHUTDOWN
not connected> exit
[root@server1 7006]# redis-cli --cluster info 127.0.0.1:7001
Could not connect to Redis at 127.0.0.1:7006: Connection refused
Could not connect to Redis at 127.0.0.1:7002: Connection refused
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
[OK] 0 keys in 2 masters.
0.00 keys per slot on average.
[root@server1 7006]# redis-cli -c -p 7001
127.0.0.1:7001> get name
(error) CLUSTERDOWN The cluster is down
[root@server1 7006]# redis-server redis.conf
[root@server1 7006]# cd ../7002
[root@server1 7002]# redis-server redis.conf
[root@server1 7002]# redis-cli --cluster info 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 1 keys | 5462 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
[OK] 1 keys in 3 masters.
0.00 keys per slot on average.
[root@server1 7002]# redis-cli -c -p 7001
127.0.0.1:7001> get name
-> Redirected to slot [5798] located at 127.0.0.1:7006
"ccj"
127.0.0.1:700
[root@server1 7001]# cd /usr/local/rediscluster/
[root@server1 rediscluster]# mkdir 7007 7008
[root@server1 rediscluster]# ls
7001 7002 7003 7004 7005 7006 7007 7008
[root@server1 rediscluster]# cd 7001
[root@server1 7001]# cp redis.conf ../7007
[root@server1 7001]# cp redis.conf ../7008
[root@server1 7001]# cd ../7007
[root@server1 7007]# vim redis.conf
[root@server1 7007]# redis-server redis.conf
[root@server1 7007]# cd ../7008
[root@server1 7008]# vim redis.conf
[root@server1 7008]# redis-server redis.conf
[root@server1 7008]# redis-cli --cluster add-node 127.0.0.1:7007 127.0.0.1:7001
。。。
[OK] All 16384 slots covered.
>>> Send CLUSTER MEET to node 127.0.0.1:7007 to make it join the cluster.
[OK] New node added correctly.
[root@server1 7008]# redis-cli --cluster check 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 1 keys | 5462 slots | 1 slaves.
127.0.0.1:7007 (31011a40...) -> 0 keys | 0 slots | 0 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
M: 31011a40a4ed1eb13523aad3c03543e5ff2124cf 127.0.0.1:7007
slots: (0 slots) master
[root@server1 7008]# redis-cli --cluster add-node --cluster-slave --cluster-master-id "31011a40a4ed1eb13523aad3c03543e5ff2124cf" 127.0.0.1:7008 127.0.0.1:7007
[root@server1 7008]# redis-cli --cluster check 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 5461 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 1 keys | 5462 slots | 1 slaves.
127.0.0.1:7007 (31011a40...) -> 0 keys | 0 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5461 slots | 1 slaves.
[OK] 1 keys in 4 masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 127.0.0.1:7001)
M: 179308ef4805e94a199f920a1a3f638cb7b33571 127.0.0.1:7001
slots:[0-5460] (5461 slots) master
1 additional replica(s)
M: 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c 127.0.0.1:7006
slots:[5461-10922] (5462 slots) master
1 additional replica(s)
S: 1ea0f9bf5fde686cdc7fdf4662a8033deb411ddd 127.0.0.1:7002
slots: (0 slots) slave
replicates 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c
S: 5bec10f316650ccefa69826ab9f9a90f02c5f482 127.0.0.1:7005
slots: (0 slots) slave
replicates 179308ef4805e94a199f920a1a3f638cb7b33571
M: 31011a40a4ed1eb13523aad3c03543e5ff2124cf 127.0.0.1:7007
slots: (0 slots) master
1 additional replica(s)
M: c30cf597a69f9e990e53976edf84e88e8e1fc900 127.0.0.1:7003
slots:[10923-16383] (5461 slots) master
1 additional replica(s)
S: 2cf902a1b07b98410244a659bd3c14322d2d8344 127.0.0.1:7004
slots: (0 slots) slave
replicates c30cf597a69f9e990e53976edf84e88e8e1fc900
S: 68bea7ab7520e760bbf8f6e3ad27d8ab2383eec5 127.0.0.1:7008
slots: (0 slots) slave
replicates 31011a40a4ed1eb13523aad3c03543e5ff2124cf
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
从其他节点分300个哈希槽给7007
[root@server1 7008]# redis-cli --cluster reshard --cluster-from all --cluster-to 31011a40a4ed1eb13523aad3c03543e5ff2124cf --cluster-slots 300 --cluster-yes 127.0.0.1:7007
[root@server1 7008]# redis-cli --cluster check 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 5362 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 1 keys | 5361 slots | 1 slaves.
127.0.0.1:7007 (31011a40...) -> 0 keys | 299 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 5362 slots | 1 slaves.
[OK] 1 keys in 4 masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 127.0.0.1:7001)
M: 179308ef4805e94a199f920a1a3f638cb7b33571 127.0.0.1:7001
slots:[99-5460] (5362 slots) master
1 additional replica(s)
M: 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c 127.0.0.1:7006
slots:[5562-10922] (5361 slots) master
1 additional replica(s)
S: 1ea0f9bf5fde686cdc7fdf4662a8033deb411ddd 127.0.0.1:7002
slots: (0 slots) slave
replicates 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c
S: 5bec10f316650ccefa69826ab9f9a90f02c5f482 127.0.0.1:7005
slots: (0 slots) slave
replicates 179308ef4805e94a199f920a1a3f638cb7b33571
M: 31011a40a4ed1eb13523aad3c03543e5ff2124cf 127.0.0.1:7007
slots:[0-98],[5461-5561],[10923-11021] (299 slots) master
1 additional replica(s)
M: c30cf597a69f9e990e53976edf84e88e8e1fc900 127.0.0.1:7003
slots:[11022-16383] (5362 slots) master
1 additional replica(s)
S: 2cf902a1b07b98410244a659bd3c14322d2d8344 127.0.0.1:7004
slots: (0 slots) slave
replicates c30cf597a69f9e990e53976edf84e88e8e1fc900
S: 68bea7ab7520e760bbf8f6e3ad27d8ab2383eec5 127.0.0.1:7008
slots: (0 slots) slave
replicates 31011a40a4ed1eb13523aad3c03543e5ff2124cf
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
可以看到其他节点向7007分哈希槽
[root@server1 7008]# redis-cli --cluster rebalance --cluster-threshold 1 --cluster-use-empty-masters 127.0.0.1:7001
>>> Performing Cluster Check (using node 127.0.0.1:7001)
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
>>> Rebalancing across 4 nodes. Total weight = 4.00
Moving 1266 slots from 127.0.0.1:7003 to 127.0.0.1:7007
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
Moving 1266 slots from 127.0.0.1:7001 to 127.0.0.1:7007
##################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
Moving 1265 slots from 127.0.0.1:7006 to 127.0.0.1:7007
#################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
[root@server1 7008]# redis-cli --cluster check 127.0.0.1:7001
127.0.0.1:7001 (179308ef...) -> 0 keys | 4096 slots | 1 slaves.
127.0.0.1:7006 (0c084bcd...) -> 0 keys | 4096 slots | 1 slaves.
127.0.0.1:7007 (31011a40...) -> 1 keys | 4096 slots | 1 slaves.
127.0.0.1:7003 (c30cf597...) -> 0 keys | 4096 slots | 1 slaves.
[OK] 1 keys in 4 masters.
0.00 keys per slot on average.
>>> Performing Cluster Check (using node 127.0.0.1:7001)
M: 179308ef4805e94a199f920a1a3f638cb7b33571 127.0.0.1:7001
slots:[1365-5460] (4096 slots) master
1 additional replica(s)
M: 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c 127.0.0.1:7006
slots:[6827-10922] (4096 slots) master
1 additional replica(s)
S: 1ea0f9bf5fde686cdc7fdf4662a8033deb411ddd 127.0.0.1:7002
slots: (0 slots) slave
replicates 0c084bcddfaf5adbaac1aa98fda5f7c6c440816c
S: 5bec10f316650ccefa69826ab9f9a90f02c5f482 127.0.0.1:7005
slots: (0 slots) slave
replicates 179308ef4805e94a199f920a1a3f638cb7b33571
M: 31011a40a4ed1eb13523aad3c03543e5ff2124cf 127.0.0.1:7007
slots:[0-1364],[5461-6826],[10923-12287] (4096 slots) master
1 additional replica(s)
M: c30cf597a69f9e990e53976edf84e88e8e1fc900 127.0.0.1:7003
slots:[12288-16383] (4096 slots) master
1 additional replica(s)
S: 2cf902a1b07b98410244a659bd3c14322d2d8344 127.0.0.1:7004
slots: (0 slots) slave
replicates c30cf597a69f9e990e53976edf84e88e8e1fc900
S: 68bea7ab7520e760bbf8f6e3ad27d8ab2383eec5 127.0.0.1:7008
slots: (0 slots) slave
replicates 31011a40a4ed1eb13523aad3c03543e5ff2124cf
[OK] All nodes agree about slots configuration.
>>> Check for open slots...
>>> Check slots coverage...
[OK] All 16384 slots covered.
七、哈希槽均衡