Sentinal: Docs says
Redis Sentinel provides high availability for Redis. In practical terms this means that using Sentinel you can create a Redis deployment that resists without human intervention to certain kind of failures.
I think we can achieve Sentinal
capabilities for redis cluster(in K8s) without deploying Sentinal
? I'm taking sentinal capabilities from docs and throwing some counter points from K8s.
Monitoring
- Sentinel constantly checks if your master and slave instances are working as expected.working as expected
means pod up or down. This is very native in K8s when you deploy as Deployment
(Replicasets) or even StatefulSets
Notification
- Sentinel can notify the system administrator, another computer programs, via an API, that something is wrong with one of the monitored Redis instances.Operators
?(In perspective of redis cluster state, etc )Automatic failover
- If a master is not working as expected, Sentinel can start a failover process where a slave is promoted to master, the other additional slaves are reconfigured to use the new master, and the applications using the Redis server informed about the new address to use when connecting.not working as expected
means redis pod is down. In this case, if we deploy redis with help of Operators
/StatefulSet
+Headless Service
. We have stable network ID for master/slaves even pods restart.Configuration provider
- Sentinel acts as a source of authority for clients service discovery: clients connect to Sentinels in order to ask for the address of the current Redis master responsible for a given service. If a failover occurs, Sentinels will report the new address.I'm new to redis. Please guide me if any thing wrong. Thanks.
Update1
My aim is to avoid sentinal and have HA.(Mainly master
failover)
No, there's no need for sentinel when using redis-cluster.