Can Redis Cluster replicate toa different read-only cluster in a different datacenter?

92 views
Skip to first unread message

Jacek Furmankiewicz

unread,
Jul 18, 2016, 10:49:15 AM7/18/16
to Redis DB
Hi, we are looking at Redis Cluster as an alternative to other NoSQL offerings and I have quick question.

If I set up a Redis cluster (let's say X nodes) in one datacenter, can I replicate the entire cluster to a read-only datacenter elsewhere?

Does it need to have the exact same amount of nodes? What happens if there is a mismatch in terms of number of nodes (e.g. X nodes in main datacenter, X/2 nodes in a read-only datacenter).

Thank you
Jacek

AlexanderB

unread,
Jul 18, 2016, 5:16:12 PM7/18/16
to Redis DB
Cross datacenter setups are possible with Redis-cluster, but there aren't that many well documented setups that people are using in production, nor a standard approach people agree with across the board. 

I'm pretty sure it should be possible to do what you're asking, but I'm not sure how well it will play with cluster features, such as electing new masters when one goes down. The approach I'd first look at, would be to just add a handful of slave nodes to the second data center and see if you can find a way to configure those nodes to never be promoted to masters. That would require at least 1 slave node per write node.

You couldn't be able to get away with less nodes in the second datacenter. Though you could still put multiple nodes on a single box (run multiple redis instances on different ports). That might let you still use X dedicated nodes in DC1, and X slave nodes in DC2, but with 2 nodes per box in DC2, so only X/2 hosts used. 

Another option might be to look at Dynomite. http://www.dynomitedb.com/

That's a very different approach from using Redis-Cluster, but is built with multi-dc replication in mind. If it's a cleaner fit for your use case, that might be a productive option. 
Reply all
Reply to author
Forward
0 new messages