Introduction
Sentinel helps keep your Redis database working even if some parts fail. It watches over Redis servers and quickly fixes problems to avoid downtime.
Sentinel helps keep your Redis database working even if some parts fail. It watches over Redis servers and quickly fixes problems to avoid downtime.
Sentinel runs as a separate process and monitors Redis servers. It uses configuration files to know which servers to watch. When a master server fails, Sentinel promotes a replica to master automatically.
# sentinel.conf example sentinel monitor mymaster 127.0.0.1 6379 2 sentinel down-after-milliseconds mymaster 5000 sentinel failover-timeout mymaster 60000 sentinel parallel-syncs mymaster 1
# Starting Sentinel
redis-sentinel /path/to/sentinel.confThis example shows how Sentinel works in practice by monitoring and promoting Redis servers automatically.
# This is a conceptual example, not a query. # Sentinel monitors Redis master and replicas. # If master fails, Sentinel promotes a replica automatically. # Sentinel also notifies clients about the new master. # To test, stop the master Redis server and watch Sentinel logs.
Sentinel requires at least three Sentinel instances for reliable failover decisions.
Sentinel helps avoid downtime by automatically switching to a healthy Redis server.
Sentinel watches Redis servers to detect failures quickly.
It automatically promotes a replica to master if the current master fails.
This process keeps your Redis service available without manual intervention.
mymaster on port 6379?sentinel monitor.sentinel monitor <name> <ip> <port> <quorum>, matching sentinel monitor mymaster 127.0.0.1 6379 2.Pass the test and this pattern moves unknown