Bird
Raised Fist0
Redisquery~10 mins

Sentinel quorum concept in Redis - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Sentinel quorum concept
Sentinel nodes monitor master
↓
Detect master failure?
↓
Continue monitoring
↓
Votes >= quorum?
↓
Wait and retry
Sentinel nodes watch the master. If failure is detected, they vote. If votes reach quorum, failover starts.
Execution Sample
Redis
SENTINEL MONITOR master 127.0.0.1 6379 2
SENTINEL SET master quorum 2
-- Master fails
Sentinels vote
Votes reach quorum
Failover starts
Sentinels monitor a master with quorum 2; when master fails, votes are counted and failover starts if quorum reached.
Execution Table
StepEventSentinel VotesQuorumAction
1Master is healthy02Continue monitoring
2Master failure detected by Sentinel 112Wait for more votes
3Master failure detected by Sentinel 222Wait for more votes
4Votes reach quorum22Start failover process
5Failover completed22New master elected
💡 Failover starts after quorum (2 votes) is reached.
Variable Tracker
VariableStartAfter Step 2After Step 3Final
Sentinel Votes0122
Quorum2222
ActionContinue monitoringWait for more votesWait for more votesStart failover process
Key Moments - 2 Insights
Why does Sentinel wait after only one vote?
Because quorum is 2, one vote is not enough to start failover (see execution_table step 2).
What happens if quorum is not reached?
Sentinels keep monitoring and retry voting until quorum is reached or master recovers (implied by step 2 and 3).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the Sentinel Votes count at step 3?
A2
B0
C1
D3
💡 Hint
Check the 'Sentinel Votes' column at step 3 in execution_table.
At which step does the failover process start?
AStep 3
BStep 4
CStep 2
DStep 5
💡 Hint
Look at the 'Action' column for when 'Start failover process' happens.
If quorum was set to 3, what would happen at step 3?
AFailover starts
BVotes reach quorum
CWait for more votes
DFailover completes
💡 Hint
Compare quorum value in variable_tracker and votes at step 3.
Concept Snapshot
Sentinel quorum is the minimum votes needed to start failover.
Sentinels monitor master and vote on failure.
Failover starts only if votes >= quorum.
Quorum prevents false failovers.
Set quorum based on number of Sentinels.
Full Transcript
Redis Sentinel nodes continuously monitor the master server. When a failure is detected by any Sentinel, it votes that the master is down. These votes are counted, and only if the number of votes reaches or exceeds the configured quorum does Sentinel start the failover process to elect a new master. If the votes are below quorum, Sentinels wait and continue monitoring. This quorum mechanism helps avoid false failovers caused by temporary network issues or isolated Sentinel failures. In the example, with quorum set to 2, failover starts only after two Sentinels agree the master is down.

Practice

(1/5)
1.

What does the quorum setting in Redis Sentinel control?

easy
A. The maximum number of clients connected to Redis
B. The number of replicas a master must have
C. The timeout duration for client connections
D. The number of Sentinels that must agree a master is down before failover

Solution

  1. Step 1: Understand Sentinel quorum purpose

    The quorum defines how many Sentinels must agree that the master is down before starting failover.
  2. Step 2: Eliminate unrelated options

    Options about clients, timeouts, or replicas do not relate to quorum.
  3. Final Answer:

    The number of Sentinels that must agree a master is down before failover -> Option D
  4. Quick Check:

    Sentinel quorum = agreement count [OK]
Hint: Quorum means how many Sentinels agree on failure [OK]
Common Mistakes:
  • Confusing quorum with client limits
  • Thinking quorum is a timeout setting
  • Mixing quorum with replica count
2.

Which of the following is the correct way to set the quorum to 3 in a Redis Sentinel configuration file?

sentinel monitor mymaster 127.0.0.1 6379 3
easy
A. sentinel set quorum 3
B. sentinel quorum mymaster 3
C. sentinel monitor mymaster 127.0.0.1 6379 3
D. sentinel quorum 3 mymaster

Solution

  1. Step 1: Recall correct sentinel monitor syntax

    The sentinel monitor command includes the master name, IP, port, and quorum number at the end.
  2. Step 2: Match options to syntax

    Only sentinel monitor mymaster 127.0.0.1 6379 3 matches the full correct syntax with quorum as the last argument.
  3. Final Answer:

    sentinel monitor mymaster 127.0.0.1 6379 3 -> Option C
  4. Quick Check:

    Monitor command ends with quorum number [OK]
Hint: Quorum is last number in sentinel monitor command [OK]
Common Mistakes:
  • Using 'sentinel quorum' command which does not exist
  • Placing quorum before IP or port
  • Confusing 'set' command with monitor
3.

Given 5 Sentinels monitoring a master with quorum set to 3, what happens if only 2 Sentinels report the master as down?

medium
A. Failover starts immediately
B. Failover does not start because quorum is not reached
C. All Sentinels restart
D. The master is removed from monitoring

Solution

  1. Step 1: Understand quorum requirement

    Quorum is 3, meaning at least 3 Sentinels must agree the master is down to start failover.
  2. Step 2: Analyze 2 Sentinels reporting down

    Since only 2 Sentinels report down, quorum is not met, so failover will not start.
  3. Final Answer:

    Failover does not start because quorum is not reached -> Option B
  4. Quick Check:

    Quorum unmet = no failover [OK]
Hint: Failover needs quorum Sentinels agreeing [OK]
Common Mistakes:
  • Assuming failover starts with any Sentinel down report
  • Thinking Sentinels restart on partial failure
  • Believing master is removed automatically
4.

You configured 4 Sentinels with quorum set to 3, but failover never happens even when the master is down. What is the most likely cause?

medium
A. Quorum is set higher than the number of Sentinels available
B. Sentinel IP addresses are incorrect
C. The master is not actually down
D. The Redis version does not support Sentinel

Solution

  1. Step 1: Check quorum vs Sentinels count

    Quorum is 3 but only 4 Sentinels exist; if some Sentinels are unreachable, quorum may not be met.
  2. Step 2: Identify cause of failover not triggering

    If quorum is effectively higher than reachable Sentinels, failover won't start.
  3. Final Answer:

    Quorum is set higher than the number of Sentinels available -> Option A
  4. Quick Check:

    Quorum > available Sentinels blocks failover [OK]
Hint: Quorum must be ≤ number of active Sentinels [OK]
Common Mistakes:
  • Ignoring Sentinel network issues
  • Assuming master is always down
  • Blaming Redis version without checking
5.

You have 7 Sentinels monitoring a Redis master. To ensure high availability, you want failover to start only if a majority agrees the master is down. What is the best quorum value to set?

hard
A. 4
B. 3
C. 5
D. 7

Solution

  1. Step 1: Calculate majority of 7 Sentinels

    Majority means more than half, so (7 / 2) = 3.5, rounded up to 4.
  2. Step 2: Choose quorum equal to majority

    Setting quorum to 4 ensures failover starts only if most Sentinels agree.
  3. Final Answer:

    4 -> Option A
  4. Quick Check:

    Majority quorum = 4 for 7 Sentinels [OK]
Hint: Quorum = majority of Sentinels (half + 1) [OK]
Common Mistakes:
  • Setting quorum less than half
  • Setting quorum equal to total Sentinels
  • Not rounding up majority
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard