0
0
Redisquery~20 mins

Automatic failover in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Failover Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
What triggers automatic failover in Redis Sentinel?

In Redis Sentinel, automatic failover happens when the master node is considered down. What condition causes Sentinel to start failover?

AWhen a slave node sends a manual failover request to Sentinel
BWhen the master node stops responding to PINGs from Sentinel for a configured period
CWhen the client application disconnects from the master node
DWhen the master node reaches maximum memory usage
Attempts:
2 left
💡 Hint

Think about how Sentinel detects a master failure automatically.

query_result
intermediate
1:30remaining
What is the output of the SENTINEL FAILOVER command?

Consider the Redis Sentinel command SENTINEL FAILOVER <master-name>. What is the immediate output after running this command?

A"ERROR: No such master"
B"FAILOVER_STARTED"
C"OK"
D"FAILOVER_ABORTED"
Attempts:
2 left
💡 Hint

Check the Redis Sentinel documentation for the command response.

📝 Syntax
advanced
2:00remaining
Which Redis Sentinel configuration enables automatic failover?

Which configuration directive in sentinel.conf enables Redis Sentinel to perform automatic failover?

Asentinel monitor &lt;master-name&gt; &lt;ip&gt; &lt;port&gt; &lt;quorum&gt;
Bsentinel failover-timeout &lt;master-name&gt; &lt;milliseconds&gt;
Csentinel down-after-milliseconds &lt;master-name&gt; &lt;milliseconds&gt;
Dsentinel parallel-syncs &lt;master-name&gt; &lt;number&gt;
Attempts:
2 left
💡 Hint

Which directive tells Sentinel which master to watch?

optimization
advanced
2:30remaining
How to reduce failover time in Redis Sentinel?

You want to reduce the time Redis Sentinel takes to detect a master failure and complete failover. Which combination of settings helps achieve this?

ASet <code>down-after-milliseconds</code> to a very high value and decrease <code>failover-timeout</code>
BIncrease <code>parallel-syncs</code> and <code>quorum</code> values
CDisable <code>sentinel monitor</code> to avoid delays
DDecrease <code>down-after-milliseconds</code> and <code>failover-timeout</code> values
Attempts:
2 left
💡 Hint

Think about how Sentinel detects failure and how long it waits before failover.

🔧 Debug
expert
3:00remaining
Why does Redis Sentinel failover not happen automatically?

You have a Redis Sentinel setup monitoring a master and its slaves. The master crashes, but Sentinel does not perform failover automatically. Which is the most likely cause?

AThe quorum value is set higher than the number of Sentinels available
BThe master node is still responding to PINGs from Sentinel
CThe slave nodes are configured with <code>slave-read-only no</code>
DThe <code>parallel-syncs</code> value is set to zero
Attempts:
2 left
💡 Hint

Consider how Sentinel decides a master is objectively down.