I'm trying to set up Redis Sentinel. I know that when a master goes down the sentinel pick up one of its slaves and promote it as master. I was wondering based on which attributes the new master is selected among the slaves and which slave got selected for being a new master?
Asked
Active
Viewed 935 times
1 Answers
1
After Sentinels election, the leader sentinel will do the following steps:
- Remove slaves already in down status from slave list.
- Remove slaves which disconnection time is more than ten times of down-after-milliseconds + master down time
- Select slave(s) by replica-priority(configured in slave)
- If multiple slaves are selected, sort them by sync offset, and select the most in-sync(maximum offset) slave.
- If there are still multiple selection, sort with RunId and select the smaller one.
So you can see the process order of master selection can be following order:
- Disconnection time
- Priority
- Replication offset
- Run Id

Gawain
- 1,017
- 8
- 17