Skip to content

One-Click run start.sh to start a redis sentinel based on master-slave mode.

Notifications You must be signed in to change notification settings

driftprogramming/redis-sentinel-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis sentinel configuration and usage

Redis Sentinel Master-slave Info Overview

Master: 6379
Slaves: 6380,6381
Sentinel: 26379,  26380, 26381
Master Name: redis-local-cluster

How to start

Run ./restart.sh to restart a redis sentinel master-slave cluster. Please ignore the connection refused error when your run this shell script at the first time.

chmod 777 ./restart.sh
./restart.sh

Test

1. Enter the main sentinel
(1) redis-cli -p 26379 
(2) INFO
(3) Press "Ctrl" to exit

2. Asking on slave2 sentinel : who is the master
(1) redis-cli -p 26381
(2) sentinel get-master-addr-by-name redis-local-cluster
(3) Press "Ctrl" to exit

3. Stop current master
(1) redis-cli -p 6379 shutdown
(2) Do step2 again, you will see a new master
(3) Press "Ctrl" to exit

About

One-Click run start.sh to start a redis sentinel based on master-slave mode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages