Get the App
SLTechnology News&Howtos  ›  Database  › 

Redis's Sentinel (sentinel) (concept)

Shulou Source: shulou.com Published: 2022-06-01 07:55:53 10月03日 Update

Sentinel of Redis (sentinel)

Redis's sentinel system is used to manage multiple redis server instances (instance).

Sentinels are suitable for non-clustered redis environments, such as redis master-slave environments.

In redis clusters, nodes act as sentinels, so redis clusters do not need to consider sentinel.

Main functions of sentinel:

1. Monitoring (monitoring)

Sentinel will constantly check whether master and slave are running properly.

2. Reminder (notification)

When the monitoring discovers a problem, sentinel sends a notification to the administrator through API.

3. Automatic failover (automatic failover)

When a master does not work properly, the sentinel will perform an automatic failover operation

It promotes slave to master and causes other slave to copy the new master instead.

When the client accesses the failed master, it also returns the new master address to the client.

Subjective perception of downtime: (preliminary judgment of downtime)

Each sentinel sends regular messages to other sentinel, master and slave to confirm whether the other person is alive.

If it is found that the other party does not respond within a specified period of time, the other party is temporarily considered to be down. (subjectively think it is down)

Objectively consider downtime: (confirm downtime)

If most of the sentinel in the Sentinel group reports that a master is not responding, confirm that the master is down. (objective downtime)

Through the vote algorithm, one of the other salve nodes is selected to be promoted to master, and the configuration is automatically modified.

Tags: Sentry counterparty fault cluster subjective function customer client objective environment node monitoring management continuous master-slave address multiple instance report time Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Huawei Apple MySQL Docker