php连接redis集群节点挂掉,redis集群出现宕机没法访问-redis集群管理

先来查看集群节点信息

192.168.56.101:6382> cluster nodes

03596d92625f1b778f29eb4a9128d92809dfd79a 192.168.56.101:6381 master - 0 1468858392134 2 connected 5795-10922

b1939026deb80fedde7bdb22c1df3ecfaa72f608 192.168.56.101:6380 master - 0 1468858393149 5 connected 0-5794 10923-11255

6aa027917d223b8fedd42893a89fb0e2c07c8b27 192.168.56.101:6382 myself,master - 0 0 3 connected 11256-16383

[root@master redis-cluster]# ps -ef | grep redis

root      8921     1  0 Jul18 ?        00:00:08 /usr/local/bin/redis-server 192.168.56.101:6380 [cluster]

root      8925     1  0 Jul18 ?        00:00:07 /usr/local/bin/redis-server 192.168.56.101:6381 [cluster]

root      8929     1  0 Jul18 ?        00:00:07 /usr/local/bin/redis-server 192.168.56.101:6382 [cluster]

root     23289  1785  0 00:13 pts/0    00:00:00 grep redis

把6382的进程kill 掉,再查看集群节点信息,发现6382的状态是disconnected

你可能感兴趣的:(php连接redis集群节点挂掉,redis集群出现宕机没法访问-redis集群管理)