Public Repository

Last pushed: 2 years ago
Short Description
A sentinel implementation for redis in high availability
Full Description

Usage

By default this image creates a Sentinel instance which monitors a redis cluster. You must pass in the redis master ip (or docker name) of your pre-configured redis cluster as an environment variable (MASTER_ADDR), and make sure all sentinel instances run on the same network as your redis cluster.

Also, note that by default the image expects to form a quorum of three Sentinel instances, so you must launch three docker containters pointing to the same master in order for Sentinel to work.

docker run -d --name sentinel1 --net redisnet -e MASTER_ADDR=master devopsbq/sentinel:latest

docker run -d --name sentinel1 --net redisnet -e MASTER_ADDR=master devopsbq/sentinel:latest

docker run -d --name sentinel1 --net redisnet -e MASTER_ADDR=master devopsbq/sentinel:latest

Here are the environment variables you can set:

  • SENTINEL_MASTER_NAME: The name we give to the redis master (sentinel purposes). Must be the same for all sentinel instances in a quorum.
  • MASTER_ADDR: the address of the redis master
  • MASTER_PORT: the port of the master (6379 by default)
  • DOWN_AFTER_MILLISECONDS: corresponds to Sentinel's down-after-milliseconds parameter (5000 milliseconds by default).
  • PARALLEL_SYNCS: corresponds to Sentinel's parallel-syncs parameter (only 1 by default).
  • FAILOVER_TIMEOUT: corresponds to Sentinel's failover-timeout parameter (45000 milliseconds by default).
  • SENTINEL_QUORUM: The number of Sentinels that need to agree about the fact the master is not reachable, in order for really mark the slave as failing, and eventually start a fail over procedure if possible (2 by default).

Please check Sentinel's homepage for further information.

Docker Pull Command
Owner
devopsbq