Complete the command to start a Redis Sentinel instance using the configuration file.
redis-sentinel [1]The Redis Sentinel process is started by specifying the sentinel configuration file, usually named sentinel.conf.
Complete the Sentinel configuration line to monitor a master named 'mymaster' on port 6379 with quorum 2.
sentinel monitor mymaster 127.0.0.1 [1] 2
The default Redis master port is 6379, which Sentinel monitors.
Fix the error in the Sentinel command to set the failover timeout to 15000 milliseconds.
sentinel [1] mymaster 15000
The correct Sentinel configuration directive uses hyphens: failover-timeout.
Fill both blanks to configure Sentinel to notify a script and set the client reconfiguration timeout.
sentinel notification-script mymaster [1] sentinel client-reconfig-script mymaster [2]
The notification script and client reconfiguration script paths are set separately. Here, /usr/local/bin/notify.sh is for notifications, and /usr/local/bin/reconfig.sh is for client reconfiguration.
Fill all three blanks to create a dictionary comprehension that maps each Sentinel master name to its quorum if the quorum is greater than 1.
masters_quorum = [1]: [2] for [3], quorum in sentinel_masters.items() if quorum > 1
This comprehension creates a dictionary where each key is the master name and the value is its quorum, but only for quorums greater than 1.