Domanda

We have a redis cluster with a master and a slave managed by three sentinel processes, and an additional remote slave, hosted in a different datacenter, for transparent failover and data preservation in the case that something bad happens to the master and slave machines.

It may happen that a transient error takes down the master redis process only, and in this situation we would like to see the slave process promoted to master, and the remote slave reslaved to it. However, it seems that sentinel could just as easily promote the remote slave to master, and we have not found any way to prevent this.

Is there any way to mark a particular slave machine as unpromotable, so that sentinel will not try to make it the master in the event of a failover?

È stato utile?

Soluzione

Yes. In the slave's config file set the slave-priority setting to zero (the number not the word).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top