Is master always redis instance with smallest priority?

半腔热情 提交于 2019-12-10 23:14:52

问题


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.

Is this behavior intended and somewhere documented? I don't seem to find anything in the redis sentinel documentation.


回答1:


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)

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.



来源:https://stackoverflow.com/questions/43351045/is-master-always-redis-instance-with-smallest-priority

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!