2017-10-09 5 views
0

私はRedis Clusterを以下のように作成しました。Redis Cluster - スレーブがFAILOVERしない

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 

私は同時に、クラスタのマスター(xxx.xxx.xxx.196の2つのインスタンス)である2つのRedisのインスタンスを停止すると、クラスタが回復に失敗していることを経験している、

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) 

しかし、同時に私が.195サーバの2つのインスタンスを停止すると、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のログ:
SRC:https://redis.io/topics/cluster-tutorial 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 

答えて

0

が問題を発見します実際には、ノードが故障したときや通信できないときに操作を続行できるということです。しかし、大規模な障害(たとえば、の大部分のマスターが利用できない場合は、)の場合、クラスタは動作を停止します。

関連する問題