Single cluster spanning multiple data centers


#1

I’m new to Couchbase and working to setup one toaddress some of our RDBMs limitations…Has anyone architected a couchbase installation where node members of a single cluster are located in different data centers (possibly in different US time zones)? Say you have 2 DCs and traditionally one would setup 2 clusters, one each DC, and consumers like Tomcat apps would be setup via DNS/LB to favor the couchbase cluster in the same DC. This I believe worked for many but what I’m thinking is have just a single cluster whose nodes (5 or 7) are setup between 2 DCs (say 4 nodes in the primary DC and 3 nodes in the 2ndary); no XDCR in this scenario but replicas across DCs. It’s my assumption that leader election will take place automagically once the primary node goes offline for whatever reason… Tomcat apps running opposite to the primary DC where the couch primary node is would have latency issues? Is this setup even worth talking about or this is totally nuts? My perception of couchbase is it’s a tech that breaks the DC silo concept, cloud-native…Thoughts? pros? cons? Also, is adding more nodes to factor MDS in this single cluster setup workable?
TIA for you thoughts/input.


#2

Hi @jcb,

As long as the all the necessary ports are open, it’s possible for you to run a cluster that spans multiple data centers. The latency will probably be worse when accessing data on the nodes in the other data center. You can’t really predict which pieces of data will be in which data center. Further, if you want to do querying or map/reduce, it’s definitely going to affect performance.

This is the type of situation that XDCR was designed for, really, and I’d highly recommend you go that direction instead. I don’t see any cons to using XDCR.

However, if it works for you and your situation, then I wouldn’t call you “nuts”.