In recent study, I was led to the belief that it is not possible for redis to be setup with multiple masters with each master having 2 slaves.


I was quite taken aback by this comment so I decided to ask the community whether it is possible and how people are handling fail overs?

I have heard of the redis-cluster project but it seems like this isn't really stable at the moment so I wasn't daring enough to try this in production.

1 Answer 1


You can deploy as many masters as you want, with any number of slaves each, but they will behave like a single separated cluster with their own memory space, and it will be your responsibility at the application layer to spread your keys properly using each of the masters, just as you would do in a Memcached multi-node deployment.

Also, if you have no Redis Sentinel watching your data nodes, your application will have to take care of the failover process in a per-master basis to promote one of the slaves as master and redirect other slaves to use the new master.

Anyway, a single slave is enough for most use cases, unless you intend to use all of the slaves as read replicas for improved read throughput.

And about Redis-Cluster, well... IMHO, Redis Cluster introduces some penalties (No multi-key operations. no pipelining...) that have a big impact in the typical Redis use case, so you should evaluate it carefully before implementing it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.