Implementations of Redis's highly available scenarios: master-Slave switching and virtual IP or client
Starting with Redis 2.8 to join the Sentinel mechanism to enable server-side master-slave switchover, but no virtual IP or client switching scheme has been realized
Redis-sentinel is an officially recommended high availability (HA) solution for Redis
When using Redis for master-slave high-availability scenarios, if Master goes down, the Redis itself (including many of its clients) does not implement automatic primary and standby switching,
The Redis-sentinel itself is also a standalone process that monitors multiple Master-slave clusters and discovers that the master can be switched on automatically after the outage.
Function:
Monitor Redis to work as expected;
If a Redis node is found to be running, it can notify another process;
Ability to switch automatically. When a master node is unavailable, it is possible to elect one of the master's multiple slave (if there are more than one slave) as the new master, The other slave node changes the address of the master that it follows to the new address of the slave that is promoted to master
It is unreliable to use only a single Sentinel process to monitor Redis clusters, and the entire cluster system will not function as expected when the Sentinel process goes down. So it is necessary to have sentinel cluster
Benefits:
Solve single point problem;
Clients with multiple Sentinel,redis can freely connect to any sentinel to get information about the Redis cluster
Redis-sentinel (Redis cluster monitoring management)