What Is Redis Sentinel

What Is Redis Sentinel?

這篇介紹What Is Redis Sentinel?

Intro

1
2
3
4
5
6
7
8
9
10
11
12
13
14
The master-slave database architecture helps increase the scalability 
and performance of your enterprise database, offloading computation to
the slave nodes and creating backups. However, this architecture can
result in availability issues in the event that the master node goes down,
causing the slave nodes to lose connection.

First released in 2012, Redis Sentinel is a high-availability solution for Redis.
The Redis Sentinel platform performs several key functions to ensure high availability
for your enterprise databases:

Monitoring your Redis deployment, including master and slave instances
Notifying you of important issues and changes in the Redis environment
Automatically handling failover events in the case that a master node is unavailable
Helping clients find the address of the current master node

Sentinel Init Parameters YAML

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
sentinelServersConfig:
idleConnectionTimeout:10000
pingTimeout:1000
connectTimeout:10000
timeout:3000
retryAttempts:3
retryInterval:1500
reconnectionTimeout:3000
failedAttempts:3
password:null
subscriptionsPerConnection:5
clientName:null
loadBalancer:!<org.redisson.connection.balancer.RoundRobinLoadBalancer>{}
slaveSubscriptionConnectionMinimumIdleSize:1
slaveSubscriptionConnectionPoolSize:50
slaveConnectionMinimumIdleSize:32
slaveConnectionPoolSize:64
masterConnectionMinimumIdleSize:32
masterConnectionPoolSize:64
readMode:"SLAVE"
sentinelAddresses:
-"redis://127.0.0.1:26379"
-"redis://127.0.0.1:26389"
masterName:"mymaster"
database:0
threads:0
nettyThreads:0
codec:!<org.redisson.codec.JsonJacksonCodec>{}
"transportMode":"NIO"