Redis Clustering With Redis Sentinel On Docker

docker-compose up --build
docker-compose ps
docker-compose scale slave=4
docker-compose scale sentinel=3
  1. Each “sentinel” service verifies that master is down. When specified number of “sentinel” service(quorum) verifies that master is down, goes next step.
  2. Sentinels will wait that the master service goes up again on the specified time. “Automatic Failover” starts if master doesn’t go to up.
    Sentinel services select from one of slaves as master by election.
  3. Finally selected master service configuration changes are distributed to all “redis” services.
docker-compose exec sentinel redis-cli -p 26379 SENTINEL get-master-addr-by-name mymaster
docker-compose pause master
docker-compose logs sentinel

--

--

Tech Lead / Architect, Data Engineer, loves #python #symfony #django

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Mustafa İleri

Mustafa İleri

591 Followers

Tech Lead / Architect, Data Engineer, loves #python #symfony #django