Sentinel architecture helps keep your Redis database safe and working well by watching over it and fixing problems automatically.
Sentinel architecture in Redis
sentinel monitor <master-name> <ip> <port> <quorum> sentinel down-after-milliseconds <master-name> <milliseconds> sentinel failover-timeout <master-name> <milliseconds> sentinel parallel-syncs <master-name> <number>
master-name is a name you give to your main Redis server.
quorum is how many Sentinel instances must agree a server is down before action.
sentinel monitor mymaster 127.0.0.1 6379 2
sentinel down-after-milliseconds mymaster 5000sentinel failover-timeout mymaster 60000This configuration sets up Sentinel to watch a Redis master server at IP 192.168.1.100 on port 6379. It requires 2 Sentinels to agree before marking the master down. It waits 10 seconds before deciding the master is down, allows 3 minutes for failover, and syncs one replica at a time.
sentinel monitor mymaster 192.168.1.100 6379 2 sentinel down-after-milliseconds mymaster 10000 sentinel failover-timeout mymaster 180000 sentinel parallel-syncs mymaster 1
Sentinel runs as a separate process alongside Redis servers.
Multiple Sentinel instances improve reliability by agreeing on server status.
Failover means switching to a backup Redis server automatically to keep your app running.
Sentinel architecture watches Redis servers to detect failures.
It automatically switches to backups to keep data available.
It helps manage Redis servers easily and reliably.