gpt4 book ai didi

Redis Cluster - Slave 不 FAILOVER

转载 作者:可可西里 更新时间:2023-11-01 11:25:08 26 4
gpt4 key购买 nike

我已经创建了一个 Redis 集群,如下所示。

xxx.xxx.xxx.195:9100    xxx.xxx.xxx.196:9100    xxx.xxx.xxx.197:9100
xxx.xxx.xxx.195:9200 xxx.xxx.xxx.196:9200 xxx.xxx.xxx.197:9200

我遇到过,当我同时停止作为集群主节点的 2 个 Redis 实例(xxx.xxx.xxx.196 的 2 个实例)时,集群无法恢复,

xxx.xxx.xxx.195:9100 (Master)    xxx.xxx.xxx.196:9100 (Master)   xxx.xxx.xxx.197:9100 (Slave)
xxx.xxx.xxx.195:9200 (Slave) xxx.xxx.xxx.196:9200 (Master) xxx.xxx.xxx.197:9200 (Slave)

但同时,如果我停止 2 个 .195 服务器实例,其中 9100 -Master9200 - Slave。集群恢复正常

集群配置文件:

protected-mode no
activerehashing yes
cluster-enabled yes
cluster-config-file /opt/redis/conf/nodes9100.conf
cluster-slave-validity-factor 0
cluster-node-timeout 5000
appendonly yes

Redis登录专用从服务器:

28939:S 09 Oct 16:08:32.834 - 0 clients connected (0 slaves), 1327200 bytes in use
28939:S 09 Oct 16:08:32.834 * Connecting to MASTER xxx.xxx.xxx.196:9200
28939:S 09 Oct 16:08:32.835 * MASTER <-> SLAVE sync started
28939:S 09 Oct 16:08:32.835 # Error condition on socket for SYNC: Connection refused
28939:S 09 Oct 16:08:33.837 * Connecting to MASTER xxx.xxx.xxx.196:9200
28939:S 09 Oct 16:08:33.837 * MASTER <-> SLAVE sync started
28939:S 09 Oct 16:08:33.837 # Error condition on socket for SYNC: Connection refused
28939:S 09 Oct 16:08:34.839 * Connecting to MASTER xxx.xxx.xxx.196:9200
28939:S 09 Oct 16:08:34.839 * MASTER <-> SLAVE sync started
28939:S 09 Oct 16:08:34.839 # Error condition on socket for SYNC: Connection refused
28939:S 09 Oct 16:08:35.840 * Connecting to MASTER xxx.xxx.xxx.196:9200
28939:S 09 Oct 16:08:35.840 * MASTER <-> SLAVE sync started
28939:S 09 Oct 16:08:35.840 # Error condition on socket for SYNC: Connection refused
28939:S 09 Oct 16:08:36.744 - Node 982d9b0a50b393d5fe604caefc0acaae68547648 reported node b57d59fb5685daeaac7e249d99fa257e9be66f4f as not reachable.
28939:S 09 Oct 16:08:36.844 * Connecting to MASTER xxx.xxx.xxx.196:9200
28939:S 09 Oct 16:08:36.844 * MASTER <-> SLAVE sync started
28939:S 09 Oct 16:08:36.844 # Error condition on socket for SYNC: Connection refused

最佳答案

发现问题:
来源:https://redis.io/topics/cluster-tutorialRedis 集群还在分区期间提供一定程度的可用性,即在实际情况下,当某些节点出现故障或无法通信时继续操作的能力。但是,如果发生更大的故障(例如,当大多数主节点不可用时),集群将停止运行。

关于Redis Cluster - Slave 不 FAILOVER,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46644861/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com