1

I have a redis master setup with 2 slaves and a sentinal on each.

If the master goes down for say 2 seconds (+sdown) and comes back up (-sdown), it reads the last snapshot, and the slaves resync with the master.

The problem with this is that there may have been many writes between the last save and the +sdown. It seems like if the master goes from +sdown to -sdown and never +odown (where a failover is initiated), it should be able to sync FROM a slave. My reasoning is that the replication stream is continuous and the slaves most likely have a more accurate reflection of the masters state when +sdown happened.

Is there some config that I can do this? Am I forced to rely on the AOF or snapshots?

(Edit: adding sentinel tag)

4

1 回答 1

3

你不能做部分故障转移,要么你做,要么你不做,以提升从属为主。

从 Redis哨兵

自动故障转移。如果一个 master 没有按预期工作,Sentinel 可以启动一个故障转移过程,其中一个 slave 被提升为 master,其他额外的 slave 被重新配置以使用新的 master,并且使用 Redis 服务器的应用程序通知新地址以在何时使用连接。

于 2014-03-11T14:51:54.027 回答