Redis Sentinels are part of the high availability solution provided by Redis. They can monitor master and replica instances, notifying applications about the switch in roles due to system level failures. In enterprise environments, high availability and failover handling are critical, and that's where Sentinel comes into play.
Although Redis Enterprise provides built-in automatic failover, you might still need to use Sentinel when it's necessary to notify clients about failovers or when dealing with other systems like stunnel, PgBouncer, etc. Redis Enterprise uses its own cluster management and doesn't directly integrate with Sentinel. Any instance managed by Redis Enterprise would be independent of Sentinel.
Here's a basic setup for Redis with Sentinel:
# Start the Redis server redis-server /path/to/your/redis.conf # Start the Redis Sentinel redis-sentinel /path/to/your/sentinel.conf
Your sentinel.conf
file should at minimum include the master that Sentinel will be monitoring:
sentinel monitor mymaster 127.0.0.1 6379 2 sentinel down-after-milliseconds mymaster 5000 sentinel failover-timeout mymaster 10000
In the above configuration:
down-after-milliseconds
configures the time (in milliseconds) the Sentinel waits before deciding the master is down.failover-timeout
configures the time (in milliseconds) the Sentinel waits before starting a new failover attempt if the last one was unsuccessful.For more detailed configuration options and setup instructions, see Redis Sentinel Documentation.
Please consult the Redis Enterprise documentation or contact Redis Labs for specific instructions on integrating with Redis Enterprise.
Dragonfly is fully compatible with the Redis ecosystem and requires no code changes to implement.