Bird
Raised Fist0
Redisquery~20 mins

Why Sentinel provides high availability in Redis - Challenge Your Understanding

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Redis Sentinel Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How Sentinel detects a Redis master failure

Which mechanism does Redis Sentinel use to detect that the master node is down?

ASentinel waits for a manual alert from the administrator to mark the master as down.
BSentinel monitors the master only when clients report errors connecting to it.
CSentinel uses periodic PING messages to the master and waits for responses within a timeout.
DSentinel uses a fixed schedule to restart the master every hour to prevent failures.
Attempts:
2 left
💡 Hint

Think about how a system can automatically check if another system is alive.

🧠 Conceptual
intermediate
2:00remaining
Role of Sentinel in failover process

What is the main role of Redis Sentinel when a master node fails?

ASentinel shuts down all Redis nodes to prevent data loss.
BSentinel automatically promotes a slave to master and updates other nodes to use the new master.
CSentinel sends an email alert but does not change any node roles.
DSentinel deletes the failed master data permanently.
Attempts:
2 left
💡 Hint

Consider what happens to keep the system running when the main server stops working.

❓ query_result
advanced
2:00remaining
Sentinel quorum and failover decision

Given a Sentinel setup with 5 Sentinel nodes monitoring a master, what is the minimum number of Sentinels that must agree the master is down to start failover if the quorum is set to 3?

A3 Sentinels must agree the master is down to start failover.
B1 Sentinel is enough to start failover immediately.
C2 Sentinels must agree the master is down to start failover.
DAll 5 Sentinels must agree before failover starts.
Attempts:
2 left
💡 Hint

Quorum means the minimum number of votes needed to make a decision.

🧠 Conceptual
advanced
2:00remaining
How Sentinel maintains system availability during failover

Which of the following best explains how Redis Sentinel maintains high availability during a master failure?

ASentinel automatically deletes all data on slaves to prevent conflicts.
BSentinel pauses all Redis operations until the failed master is manually fixed.
CSentinel duplicates data from the failed master to a backup server before failover.
DSentinel detects failure, promotes a slave to master, and updates clients to connect to the new master without manual intervention.
Attempts:
2 left
💡 Hint

Think about how the system keeps working smoothly even if one part fails.

🧠 Conceptual
expert
3:00remaining
Sentinel's role in preventing split-brain scenarios

How does Redis Sentinel help prevent split-brain situations during network partitions?

ASentinel uses quorum and majority agreement among Sentinels to decide failover, avoiding multiple masters.
BSentinel disables all slaves during network issues to prevent conflicts.
CSentinel allows multiple masters to run simultaneously to ensure availability.
DSentinel relies on manual administrator intervention to resolve split-brain.
Attempts:
2 left
💡 Hint

Consider how a group decision can avoid conflicting actions.

Practice

(1/5)
1. What is the main reason Redis Sentinel provides high availability?
easy
A. It compresses data to save storage space.
B. It increases the speed of Redis queries.
C. It encrypts Redis data for security.
D. It monitors Redis servers and promotes replicas automatically on failure.

Solution

  1. Step 1: Understand Sentinel's role in monitoring

    Sentinel continuously watches Redis servers to detect if the master fails.
  2. Step 2: Recognize automatic failover

    When the master fails, Sentinel promotes a replica to master automatically to keep service running.
  3. Final Answer:

    It monitors Redis servers and promotes replicas automatically on failure. -> Option D
  4. Quick Check:

    Sentinel = Automatic failover [OK]
Hint: Sentinel watches and switches masters automatically [OK]
Common Mistakes:
  • Confusing Sentinel with data compression tools
  • Thinking Sentinel speeds up queries
  • Assuming Sentinel only encrypts data
2. Which of the following is the correct way to configure Redis Sentinel to monitor a master named mymaster on port 6379?
easy
A. sentinel monitor mymaster 127.0.0.1 6379 2
B. sentinel watch mymaster 127.0.0.1 6379 2
C. sentinel track mymaster 127.0.0.1 6379 2
D. sentinel check mymaster 127.0.0.1 6379 2

Solution

  1. Step 1: Recall Sentinel configuration command

    The correct command to start monitoring a master is sentinel monitor.
  2. Step 2: Verify command syntax

    The syntax is sentinel monitor <name> <ip> <port> <quorum>, matching sentinel monitor mymaster 127.0.0.1 6379 2.
  3. Final Answer:

    sentinel monitor mymaster 127.0.0.1 6379 2 -> Option A
  4. Quick Check:

    Monitor command = sentinel monitor [OK]
Hint: Use 'sentinel monitor' to watch a master server [OK]
Common Mistakes:
  • Using 'watch' instead of 'monitor'
  • Confusing 'track' or 'check' commands
  • Wrong command syntax order
3. Given a Redis Sentinel setup monitoring a master and two replicas, what will happen if the master server stops responding?
medium
A. Sentinel will promote one replica to master automatically.
B. Sentinel will do nothing and wait for manual restart.
C. Sentinel will shut down all Redis servers.
D. Sentinel will delete all data to prevent corruption.

Solution

  1. Step 1: Understand Sentinel's failure detection

    Sentinel detects when the master is down by monitoring its health.
  2. Step 2: Recognize Sentinel's failover action

    Upon detecting failure, Sentinel promotes a replica to master automatically to maintain availability.
  3. Final Answer:

    Sentinel will promote one replica to master automatically. -> Option A
  4. Quick Check:

    Failover = Replica promoted [OK]
Hint: Master down? Sentinel promotes replica automatically [OK]
Common Mistakes:
  • Thinking Sentinel waits for manual restart
  • Assuming Sentinel shuts down servers
  • Believing Sentinel deletes data
4. You configured Redis Sentinel but it never promotes a replica after the master fails. What is the most likely cause?
medium
A. The replicas have more memory than the master.
B. The Redis version is too new for Sentinel to work.
C. Sentinel quorum is not reached due to insufficient Sentinel nodes.
D. Sentinel does not support automatic failover.

Solution

  1. Step 1: Understand Sentinel quorum requirement

    Sentinel requires a quorum (minimum number of Sentinels agreeing) to trigger failover.
  2. Step 2: Identify cause of no failover

    If quorum is not reached, Sentinel will not promote replicas automatically.
  3. Final Answer:

    Sentinel quorum is not reached due to insufficient Sentinel nodes. -> Option C
  4. Quick Check:

    Failover needs quorum [OK]
Hint: Check Sentinel quorum count if failover doesn't happen [OK]
Common Mistakes:
  • Blaming replica memory size
  • Assuming Redis version blocks Sentinel
  • Thinking Sentinel lacks failover feature
5. In a Redis Sentinel cluster with 5 Sentinel nodes monitoring 3 replicas and 1 master, what happens if 2 Sentinels lose network connectivity but the master fails?
hard
A. All replicas are shut down to avoid split-brain.
B. Failover proceeds because quorum of Sentinels still agree on master failure.
C. Sentinel automatically adds new nodes to replace disconnected ones.
D. Failover is blocked because any Sentinel failure stops the process.

Solution

  1. Step 1: Calculate quorum in a 5-node Sentinel cluster

    Quorum is usually a majority; with 5 nodes, quorum is 3.
  2. Step 2: Assess failover with 2 disconnected Sentinels

    3 Sentinels remain connected, so quorum is met and failover proceeds.
  3. Step 3: Understand Sentinel behavior on partial network loss

    Sentinel does not block failover if quorum is reached despite some nodes being disconnected.
  4. Final Answer:

    Failover proceeds because quorum of Sentinels still agree on master failure. -> Option B
  5. Quick Check:

    Quorum met = failover proceeds [OK]
Hint: Failover needs majority Sentinels, not all connected [OK]
Common Mistakes:
  • Thinking any Sentinel loss blocks failover
  • Assuming Sentinel auto-adds nodes
  • Believing replicas shut down on master failure
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