问题描述
我正在运行带有前哨的主从式Redis,当我杀死主机时,优先级最低的从机将成为新主机.
I am running master-slave redis with sentinel,when I kill my master, the lowest priority slave becomes the new master.
但是当我再次启动具有较低优先级的旧主服务器时,它不会成为主服务器.
But when I start my old master again, which has an even lower priority, it does not become the master.
此行为是否有意并在某处记录在案?我似乎在redis前哨文档中找不到任何内容.
Is this behavior intended and somewhere documented? I don't seem to find anything in the redis sentinel documentation.
推荐答案
关于故障转移行为.明确指出,优先级最低的从属服务器是首选的(除非它为零)-请参见文档(从属优先级"部分)
In regards to "failover behavior. It's clearly states that the lowest priority slave is preferred (unless it's zero) -see the docs ("Slaves priority" section)
关于后备"行为.旧的主机重新联机后,将不会恢复其旧的主机状态.这是有意的,因为该想法是尽可能少地更改前哨ha群集的状态.下一次故障转移一旦发生,如果旧的主节点(现在是从节点)的优先级最低,它将被提升为主节点.
In Regards to "fallback" behavior. Once the old master goes back online, it will not regain it's old master status back. This is intentional as the idea is to change the state of the sentinel ha-cluster as little as possible. Once the next failover takes place, if the old master ( now a slave ) has the lowest priority, it'll promoted to master again.
这篇关于主服务器是否总是以最小的优先级重做实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!