0
0
Redisquery~20 mins

Client discovery through Sentinel in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Sentinel Client Discovery Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
Discovering the current master address using Sentinel
Given a Redis Sentinel setup monitoring a master named mymaster, which command returns the IP and port of the current master node?
Redis
SENTINEL get-master-addr-by-name mymaster
A["127.0.0.1"]
B["6379"]
C["mymaster", "127.0.0.1"]
D["127.0.0.1", "6379"]
Attempts:
2 left
💡 Hint
The command returns a two-element array with IP and port.
🧠 Conceptual
intermediate
1:30remaining
Understanding Sentinel's role in client discovery
What is the primary purpose of Redis Sentinel in client discovery?
ATo provide clients with the current master node address dynamically
BTo store all client connection information permanently
CTo act as a proxy between clients and Redis servers
DTo replace Redis servers during downtime
Attempts:
2 left
💡 Hint
Sentinel helps clients find the right master after failover.
📝 Syntax
advanced
2:00remaining
Correct syntax for querying Sentinel for master info
Which of the following commands correctly queries Sentinel to get detailed information about the master named mymaster?
ASENTINEL get-master-info mymaster
BSENTINEL master mymaster
CSENTINEL masters mymaster
DSENTINEL info mymaster
Attempts:
2 left
💡 Hint
The command is singular and uses the exact master name.
🔧 Debug
advanced
2:00remaining
Identifying error in Sentinel client discovery command
A client runs the command SENTINEL get-master-addr-by-name mymaster but receives an empty array []. What is the most likely cause?
AThe Sentinel instance is not monitoring any master named 'mymaster'
BThe Redis server is down
CThe client command syntax is incorrect
DThe Sentinel instance is overloaded with too many clients
Attempts:
2 left
💡 Hint
Check if the master name matches exactly what Sentinel monitors.
optimization
expert
2:30remaining
Optimizing client discovery in a multi-Sentinel environment
In a Redis setup with multiple Sentinel instances, what is the best practice for a client to discover the current master efficiently and reliably?
AUse a static configuration with a fixed master address
BQuery only one Sentinel instance repeatedly until it responds
CQuery multiple Sentinel instances in parallel and use the first valid response
DQuery all Redis servers directly to find the master
Attempts:
2 left
💡 Hint
Multiple Sentinels provide redundancy; use it to avoid delays.