All Projects → s7anley → Redis Sentinel Docker

s7anley / Redis Sentinel Docker

Licence: apache-2.0
Dockerfile for Redis Sentinel

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Redis Sentinel Docker

Aioredis Py
asyncio (PEP 3156) Redis support
Stars: ✭ 2,003 (+3029.69%)
Mutual labels:  redis, redis-sentinel
Redis Windows
Vagrant redis configuration and the binary releases of MS Open Tech redis port of windows
Stars: ✭ 2,596 (+3956.25%)
Mutual labels:  redis, redis-sentinel
Camellia
camellia framework by netease-im. provider: 1) redis-client; 2) redis-proxy(redis-sentinel/redis-cluster); 3) hbase-client; 4) others
Stars: ✭ 146 (+128.13%)
Mutual labels:  redis, redis-sentinel
Redex
Cloud-native Redis server implemented in Elixir
Stars: ✭ 160 (+150%)
Mutual labels:  redis, redis-sentinel
Predis
A flexible and feature-complete Redis client for PHP.
Stars: ✭ 6,966 (+10784.38%)
Mutual labels:  redis, redis-sentinel
Fastapi Plugins
FastAPI framework plugins
Stars: ✭ 104 (+62.5%)
Mutual labels:  redis, redis-sentinel
Lua Resty Redis Connector
Connection utilities for lua-resty-redis
Stars: ✭ 186 (+190.63%)
Mutual labels:  redis, redis-sentinel
Ioredis
🚀 A robust, performance-focused, and full-featured Redis client for Node.js.
Stars: ✭ 9,754 (+15140.63%)
Mutual labels:  redis, redis-sentinel
Redix
Fast, pipelined, resilient Redis driver for Elixir. 🛍
Stars: ✭ 816 (+1175%)
Mutual labels:  redis, redis-sentinel
Ledge
An RFC compliant and ESI capable HTTP cache for Nginx / OpenResty, backed by Redis
Stars: ✭ 412 (+543.75%)
Mutual labels:  redis, redis-sentinel
Lettuce Core
Advanced Java Redis client for thread-safe sync, async, and reactive usage. Supports Cluster, Sentinel, Pipelining, and codecs.
Stars: ✭ 4,319 (+6648.44%)
Mutual labels:  redis, redis-sentinel
Zabbix Template For Redis
Zabbix template + script useful to monitor Redis Server & Redis Sentinel instances
Stars: ✭ 33 (-48.44%)
Mutual labels:  redis, redis-sentinel
Predixy
A high performance and fully featured proxy for redis, support redis sentinel and redis cluster
Stars: ✭ 862 (+1246.88%)
Mutual labels:  redis, redis-sentinel
Fastonosql
FastoNoSQL is a crossplatform Redis, Memcached, SSDB, LevelDB, RocksDB, UnQLite, LMDB, ForestDB, Pika, Dynomite, KeyDB GUI management tool.
Stars: ✭ 1,001 (+1464.06%)
Mutual labels:  redis, redis-sentinel
Duckygo
一个同时支持Session以及JWT的高性能高可用 Golang Restful API 脚手架 !
Stars: ✭ 57 (-10.94%)
Mutual labels:  redis
Redisgo Async
RedisGo-Async is a Go client for Redis, both asynchronous and synchronous modes are supported,its API is fully compatible with redigo.
Stars: ✭ 60 (-6.25%)
Mutual labels:  redis
Zaneperfor
前端性能监控系统,消息队列,高可用,集群等相关架构
Stars: ✭ 1,085 (+1595.31%)
Mutual labels:  redis
Ractor
Redis based distributed actors + Dead simple API for distributed POCOs persistence
Stars: ✭ 56 (-12.5%)
Mutual labels:  redis
Deb Dev Machine
Quickly install common Developer tools, IDE's & Services on Debian 9
Stars: ✭ 63 (-1.56%)
Mutual labels:  redis
Go Todo
微信小程序 todo后端,采用GoFrame框架搭建,包含微信认证、token管理、发送微信模板消息等
Stars: ✭ 60 (-6.25%)
Mutual labels:  redis

redis-sentinel

Dockerfiles for Redis Sentinel based on alpine images, suitable for the production environment. Image is available directly from public docker registry. This images are updated via pull requests to the s7anley/redis-sentinel-docker GitHub repo.

Redis Sentinel

Redis Sentinel provides high availability for Redis. In practical terms this means that using Sentinel you can create a Redis deployment that resists without human intervention to certain kind of failures. Additionally also provides other collateral tasks such as monitoring, notifications and acts as a configuration provider for clients.

Supported tags and respective Dockerfile links

Demo

For demonstration purposes you can use docker-compose -p sentinel up -d to bootstrap one redis master and slave and single sentinel to monitor them. In case you want to simulate sentinel cluster, scale number of sentinels with docker-compose -p sentinel up -d --scale sentinel=3.

To obtain confirm, that everything is working, we can ask for current master IP address with command:

$ docker exec sentinel_sentinel_1 redis-cli -p 26379 sentinel get-master-addr-by-name mymaster

You can find all available sentinel commands in documentation

How to use this image

In documentation is suggested to add Sentinel one one at a time, in order to still guarantee that majority can be achieved only in one side of a partition, in the chance failures should happen in the process of adding new Sentinels. Recommended delay is 30 seconds.

$ docker run --name redis-sentinel_1 -d -e QUORUM=2 -e MASTER=<some ip address> redis-sentinel

Sentinel, Docker and possible issues

Running sentinel with network setting bridge will break Sentinel's auto-discovery, unless you instruct Docker to map the port 1:1. To force Sentinel to announce a specific IP (e.g. your host machine) and mapped port, you should use ANNOUNCE_IP and ANNOUNCE_PORT environment variables. For more information see documentation.

AWS ECS

Amazon EC2 Container Service currently doesn't support host network setting, therefore Sentinel has to announce IP address of host machine. Setting variable AWS_IP_DISCOVERY to true, will force auto discovery of internal IP address of EC2 machine. For further explanation see section above.

Environment Variables

MASTER - Colon-separated IP address and port or Redis master. Port is optional, REDIS_PORT is used when missing. E.g. ip_address or ip_address:port.

REDIS_PORT - Port on which is master available. Default value is 6379.

SENTINEL_PORT - A port on which sentinel is communicating. A default value is 26379. In case you change this value, don't forget to expose additional port manually. By default, only 26379 is exposed.

MASTER_NAME - Unique name for master. When defined, monitoring will be initialized.

QUORUM - 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. Default value is 2.

DOWN_AFTER - Time in milliseconds an instance should not be reachable for a Sentinel starting to think it is down. Default value 30000.

FAILOVER_TIMEOUT - Wait time before failover retry of the same master. Default value 180000.

PARALLEL_SYNCS - Sets the number of slaves that can be reconfigured to use the new master after a failover at the same time. Default value 1.

SLAVES - Manually setting of all the slaves of monitored master. Accepted format is a colon-separated IP address and port for each slave server. Multiple slaves are separated by a semicolon. E.g. ip_address:host;ip_address. Use only in-case your slave hosts could not be correctly resolved.

NOTIFICATION_SCRIPT - Manually setting of notification-script on master. Script must exists and be executable or container will fail to start.

CLIENT_RECONFIG_SCRIPT - Manually setting of client-reconfig-script on master. Script must exists and be executable or container will fail to start.

ANNOUNCE_IP - Host machine IP address.

ANNOUNCE_PORT - Mapped sentinel port.

AWS_IP_DISCOVERY - Use internal IP address of AWS EC2 machine as ANNOUNCE_IP.

AUTH_PASS - Authentication password to use when connecting to master.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].