Redis Sentinel is a system that helps monitor Redis servers, automatically switch to a backup if the main server fails, and notify you about server status.
Click to reveal answer
beginner
How does Sentinel detect a Redis server failure?
Sentinel regularly checks Redis servers by sending ping messages. If a server does not respond after a set time, Sentinel marks it as down.
Click to reveal answer
intermediate
What is a 'failover' in Redis Sentinel?
Failover is the process where Sentinel promotes a backup Redis server to become the new main server when the current main server fails.
Click to reveal answer
beginner
Which configuration file is used to set up Redis Sentinel?
Redis Sentinel uses a configuration file usually named 'sentinel.conf' where you define monitored Redis servers and Sentinel settings.
Click to reveal answer
beginner
What command starts a Redis Sentinel instance with a configuration file?
The command is: redis-sentinel /path/to/sentinel.conf
Click to reveal answer
What role does Redis Sentinel NOT perform?
AStore application data
BAutomatically failover to a replica
CMonitor Redis servers
DSend notifications about server status
✗ Incorrect
Redis Sentinel monitors and manages Redis servers but does not store application data itself.
How does Sentinel decide a Redis master is down?
AWhen it misses several ping responses
BWhen it receives a shutdown command
CWhen the disk is full
DWhen a client disconnects
✗ Incorrect
Sentinel marks a master as down after missing multiple ping responses.
What happens during a Sentinel failover?
AData is deleted
BAll Redis servers are restarted
CA new Redis master is elected from replicas
DSentinel shuts down
✗ Incorrect
Failover means promoting a replica to master to keep Redis available.
Which file do you edit to configure Redis Sentinel?
Asentinel-settings.conf
Bredis.conf
Credis-sentinel.conf
Dsentinel.conf
✗ Incorrect
The sentinel.conf file contains Sentinel configuration.
Which command starts Redis Sentinel with a config file?
Aredis-server sentinel.conf
Bredis-sentinel /path/to/sentinel.conf
Credis-cli sentinel start
Dsentinel start
✗ Incorrect
Use 'redis-sentinel' followed by the config file path to start Sentinel.
Explain how Redis Sentinel monitors and manages Redis servers to ensure high availability.
Think about how Sentinel keeps Redis running smoothly even if a server fails.
You got /4 concepts.
Describe the steps to configure and start Redis Sentinel for monitoring a Redis master server.
Focus on configuration and command to launch Sentinel.
You got /4 concepts.
Practice
(1/5)
1. What is the main purpose of Redis Sentinel in monitoring?
easy
A. To provide a graphical user interface for Redis
B. To automatically detect Redis server failures and promote replicas
C. To increase Redis memory capacity
D. To store data persistently on disk
Solution
Step 1: Understand Sentinel's role
Sentinel monitors Redis servers to detect failures automatically.
Step 2: Identify Sentinel's key feature
It can promote replicas to master to keep Redis available during failures.
Final Answer:
To automatically detect Redis server failures and promote replicas -> Option B
Quick Check:
Sentinel monitors and promotes replicas [OK]
Hint: Sentinel watches and promotes Redis servers automatically [OK]
Common Mistakes:
Confusing Sentinel with data storage
Thinking Sentinel increases memory
Assuming Sentinel provides GUI
2. Which command correctly tells Sentinel to monitor a Redis master named mymaster at IP 192.168.1.10 on port 6379 with quorum 2?
easy
A. sentinel monitor mymaster 192.168.1.10 6379
B. sentinel watch mymaster 192.168.1.10 6379 2
C. sentinel add mymaster 192.168.1.10 6379 2
D. sentinel monitor mymaster 192.168.1.10 6379 2
Solution
Step 1: Recall Sentinel monitor syntax
The correct syntax is: sentinel monitor <name> <ip> <port> <quorum>.
Step 2: Match the command to syntax
sentinel monitor mymaster 192.168.1.10 6379 2 matches the syntax exactly with all required parameters.
Final Answer:
sentinel monitor mymaster 192.168.1.10 6379 2 -> Option D
Quick Check:
Correct sentinel monitor syntax [OK]
Hint: Use 'sentinel monitor' with name, IP, port, quorum [OK]
Common Mistakes:
Using 'sentinel watch' instead of 'monitor'
Omitting quorum number
Using 'sentinel add' which is invalid
3. Given the following Sentinel configuration snippet:
What does the down-after-milliseconds setting control?
medium
A. Time Redis waits before shutting down
B. Time replicas wait before syncing
C. Time Sentinel waits before marking master as down
D. Time Sentinel waits before starting failover
Solution
Step 1: Understand 'down-after-milliseconds'
This setting defines how long Sentinel waits to consider the master as unreachable.
Step 2: Match setting to behavior
It controls the time Sentinel waits before marking the master as down.
Final Answer:
Time Sentinel waits before marking master as down -> Option C
Quick Check:
down-after-milliseconds = time to mark down [OK]
Hint: down-after-milliseconds sets master down detection time [OK]
Common Mistakes:
Confusing with Redis shutdown time
Thinking it controls replica sync delay
Assuming it delays failover start
4. You configured Sentinel with:
sentinel monitor mymaster 10.0.0.5 6379 2
But Sentinel never triggers failover even when the master is down. What is a likely cause?
medium
A. Quorum is set too high for available Sentinels
B. Master IP address is incorrect
C. Sentinel service is not running
D. Redis master port is blocked by firewall
Solution
Step 1: Understand quorum role
Quorum is the number of Sentinels that must agree master is down to trigger failover.
Step 2: Analyze failover condition
If quorum is higher than available Sentinels, failover never triggers.
Final Answer:
Quorum is set too high for available Sentinels -> Option A
Quick Check:
Failover needs quorum Sentinels agreeing [OK]
Hint: Check quorum matches number of running Sentinels [OK]
Common Mistakes:
Ignoring quorum size
Assuming IP or port issues cause failover block
Not verifying Sentinel service status
5. You have 3 Sentinel instances monitoring a Redis master with quorum 2. One Sentinel detects the master is down and starts failover, but the other two Sentinels disagree. What will happen?
hard
A. Failover will not proceed until at least 2 Sentinels agree
B. Failover proceeds immediately with one Sentinel's decision
C. Sentinel with disagreement will restart Redis master
D. All Sentinels shut down to avoid split-brain
Solution
Step 1: Understand quorum in failover
Failover requires quorum number of Sentinels to agree master is down.
Step 2: Analyze scenario with 3 Sentinels and quorum 2
Only one Sentinel detects down, so quorum not reached; failover waits.
Final Answer:
Failover will not proceed until at least 2 Sentinels agree -> Option A
Quick Check:
Failover needs quorum agreement [OK]
Hint: Failover needs quorum agreement, not just one Sentinel [OK]
Common Mistakes:
Thinking one Sentinel can trigger failover alone
Assuming Sentinels restart Redis master
Believing Sentinels shut down on disagreement
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.