0
0
Redisquery~10 mins

Client discovery through Sentinel in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the master address from Sentinel.

Redis
redis-cli -p 26379 sentinel get-master-addr-by-name [1]
Drag options to blanks, or click blank then click option'
Aprimary
Bmaster1
Credis-master
Dmymaster
Attempts:
3 left
💡 Hint
Common Mistakes
Using a wrong master name that Sentinel does not recognize.
Forgetting to specify the master name argument.
2fill in blank
medium

Complete the command to check the number of Sentinel monitors.

Redis
redis-cli -p 26379 sentinel [1]
Drag options to blanks, or click blank then click option'
Asentinels
Bslaves
Cmasters
Dget-master-addr-by-name
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'slaves' instead of 'masters' to list masters.
Using 'sentinels' which lists Sentinel instances, not masters.
3fill in blank
hard

Fix the error in the command to list slaves of a master.

Redis
redis-cli -p 26379 sentinel [1] mymaster
Drag options to blanks, or click blank then click option'
Aget-slaves
Bslaves
Cslave
Dlist-slaves
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular form 'slave' which is not a valid command.
Using made-up commands like 'get-slaves' or 'list-slaves'.
4fill in blank
hard

Fill both blanks to create a command that lists all Sentinel instances monitoring the master.

Redis
redis-cli -p 26379 sentinel [1] [2]
Drag options to blanks, or click blank then click option'
Asentinels
Bmymaster
Cmaster1
Dmasters
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'masters' instead of 'sentinels' for the first blank.
Using a wrong master name in the second blank.
5fill in blank
hard

Fill all three blanks to create a command that gets the master address by name on a custom Sentinel port.

Redis
redis-cli -p [1] sentinel [2] [3]
Drag options to blanks, or click blank then click option'
A26379
Bget-master-addr-by-name
Cmymaster
Dmasters
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong port number.
Using 'masters' instead of 'get-master-addr-by-name' command.
Using an incorrect master name.