Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have Redis Master-slave setup, and we want to fallback to the slave once the master failed. But if it has failed it should never toggle back, even if the master is online again.

Is this possible?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

There is a wordaround to do what you need. Simple put a very high value on rise parameter, and a inter of few seconds, like example below:

listen  sql-cluster 0.0.0.0:1433
        balance roundrobin
        server  sql01 192.168.100.109:1433 check backup
        server  sql02 192.168.100.180:1433 check inter 5s fall 3 rise 99999999

In this example, sql01 is backup, and sql02 is master. If master down, sql01 is up. For sql02 return to active, is necessary to do 99.999.999 healthy checks, with interval of 5 seconds.. This is around 15 years!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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