Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adrianriobo/redis-cluster
Implementation of a redis cluster in a dockerized environment
https://github.com/adrianriobo/redis-cluster
docker docker-swarm redis redis-cluster
Last synced: 16 days ago
JSON representation
Implementation of a redis cluster in a dockerized environment
- Host: GitHub
- URL: https://github.com/adrianriobo/redis-cluster
- Owner: adrianriobo
- License: mit
- Created: 2017-11-29T08:15:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-01T10:49:52.000Z (about 7 years ago)
- Last Synced: 2024-11-06T13:58:09.462Z (2 months ago)
- Topics: docker, docker-swarm, redis, redis-cluster
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# redis-cluster-docker
[![Docker Pulls](https://img.shields.io/docker/pulls/adrianriobo/redis-cluster.svg?style=flat-square)]()
## What does this solution provide
This is an implementation of a redis cluster in a dockerized environment. This project aims to solve some limitations with redis cluster in docker swarm environment
Limitations due to:
* [Swarm overaly networks does not allow to fix ips](https://github.com/moby/moby/issues/29816)
* [Redis cluster does not work with hostnames, so Ips are needed](https://github.com/antirez/redis/pull/2323)To avoid this issues and the needed for fixed Ips in the cluster. The containers will check its IPs and comunicate it with other nodes in the cluster.
This is a first approach to a real scalable architecture.
All nodes are fixed in the compose and scale up need some manual intervention. In future work, I will evolve to automate all the cluster management.
## Current images
This project will generate two images:
* [adrianriobo/redis-cluster](https://hub.docker.com/r/adrianriobo/redis-cluster/)
* [adrianriobo/redis-cluster-initializer](https://hub.docker.com/r/adrianriobo/redis-cluster-initializer/)## Versions
Actual versions for redis are:
* 4.0.2
## Utils
Clone [this project](https://github.com/adrianRiobo/redis-cluster) and use:
* **/utils/create-network.sh** Create an overlay network for redis cluster. Expand or use with your solution network
* **/utils/run-redis.sh** Create redis stack, default network redis-net. Expand or use with your solution network
* **/utils/initialize-cluster.sh** Launch after redis nodes are up. Helper container to create cluster, default network redis-net. Expand or use with your solution network