I have a Redis Cluster with 2 masters and 4 slaves (2 slaves for each master). After I manually crash a master (i.e. redis-cli -p 6379 debug segfault) slaves doesn't do anything. They detects that something wrong with the master but they are doing nothing (I waited for 20 minutes).

Here is cluster nodes output (i.e. redis-cli cluster nodes):

08dfd1bdd470a8831b33b7b0409a40bf45ee22d0 myself,slave 55787eb63780365a0c7d4a0ed72cac4b97a55ed0 0 0 1 connected
7fedf234aba8d906dca5a4725a54d1cc5c979c18 slave a739cfbcd9b804345808bb3a78b6a00b2d6050f9 0 1477865886164 2 connected
a739cfbcd9b804345808bb3a78b6a00b2d6050f9 master,fail? - 1477865551940 1477865548392 0 disconnected 8192-16383
5dcc0a0a3f13ea9343171a13fbf0ec7054dfc2ab slave a739cfbcd9b804345808bb3a78b6a00b2d6050f9 0 1477865884135 5 connected
55787eb63780365a0c7d4a0ed72cac4b97a55ed0 master - 0 1477865885150 2 connected 0-8191
601a5e0dd9d40d8c01119714e89be63eaee87900 slave 55787eb63780365a0c7d4a0ed72cac4b97a55ed0 0 1477865882100 3 connected

As we see here is a failed master node which marked as master,fail? . I don't know why it shows a question mark. But I am waiting for 20 minutes and nothing changed. Why slaves don't take over a master?


You need to have at least 3 masters to form a redis cluster. If majority of masters die at the same time, cluster becomes unusable. Failover does not happen if majority of masters are not available.

| improve this answer | |

Because pure redis cannot do failover by itself. Master and slaves in terms of redis are just for loadbalancing. You have to use Sentinel (module for redis shipped with redis by default) to achieve automatic failover.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.