Redis群集,三个主节点和三个从节点,主节点发生故障。其从属节点尚未成为主节点

时间:2020-01-01 07:10:07

标签: redis redis-cluster

我使用了由docker部署的群集,该群集位于同一主机上。 我在6382节点上使用了“ debug segfault”命令来模拟故障。 Redis版本:最新

集群信息:

127.0.0.1:6381> cluster info
cluster_state:ok
cluster_slots_assigned:16384
cluster_slots_ok:10922
cluster_slots_pfail:0
cluster_slots_fail:5462
cluster_known_nodes:6
cluster_size:3
cluster_current_epoch:6
cluster_my_epoch:1
cluster_stats_messages_ping_sent:654323
cluster_stats_messages_pong_sent:90472
cluster_stats_messages_fail_sent:5
cluster_stats_messages_sent:744800
cluster_stats_messages_ping_received:90467
cluster_stats_messages_pong_received:89386
cluster_stats_messages_meet_received:5
cluster_stats_messages_fail_received:2
cluster_stats_messages_received:179860

集群节点:

127.0.0.1:6381> cluster nodes
4791df18cbfe41dcbc742fea4cbc603c7233f7e5 120.79.75.96:6383@16383 master - 0 1577860731377 3 connected 10923-16383
4c22e659e94e5679835c37ce4fec0cccfa0a7f96 120.79.75.96:6382@16382 master,fail - 1577860604483 1577860603178 2 disconnected 5461-10922
0109528c197e841c1320f918910a61ee75583966 120.79.75.96:6384@16384 slave 4791df18cbfe41dcbc742fea4cbc603c7233f7e5 0 1577860732582 4 connected
6dc7485ec92b3ba9c11b3ee7eda44f15992d427c 120.79.75.96:6386@16386 slave 4c22e659e94e5679835c37ce4fec0cccfa0a7f96 0 1577860731879 6 connected
86b5372672220611fa4a3526bc80e25450944a16 192.168.1.37:6381@16381 myself,master - 0 1577860732000 1 connected 0-5460
f96f5068448907131521f5ac8cd8dd148f1d02dd 120.79.75.96:6385@16385 slave 86b5372672220611fa4a3526bc80e25450944a16 0 1577860732381 5 connected

redis.conf:

cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
cluster-slave-validity-factor 10
cluster-require-full-coverage no

0 个答案:

没有答案