Open joelchen opened 7 years ago
Each master node in a cluster needs a slightly different config, so you can't jus scale it up as a docker service. Instead, to run in swarm mode you'd have to have a separate service for each master member of the cluster. In that scenario swarm mode doesn't really buy you much (at least if redis is the only service running in the swarm). Also keep in mind if you're using Redis Cluster, this is not the same as using Redis Sentinel for high availability -- cluster masters are sharded, so they do not have the full dataset. For HA you need to run one slave per master. If your app isn't cluster-aware, then you basically are limited to running a (non-redis-cluster) read/write master with a read-only slave. Swarm mode is more suited towards stateless services, rather than stateful ones like redis or DBs... at least that's been my experience so far.
Would like to see a docker-compose.yml example to run Redis Cluster on 3 servers in Docker Swarm, with replication between each Redis on the 3 servers, while enabling read and write access to each Redis on the 3 servers.