1

With Couchbase Enterprise 2.5 comes Rack Awareness, which suggests replica data will automatically be kept on separate AWS availability zones without the need for XDCR or additional configuration.

How does Rack Awareness replication compare to XDCR:

Is XDCR different in any way, is it better on bandwidth, does it compare changes differently, is the protocol different?

Which is AWS best practice:

  • Using availability-zones as server-groups for rack awareness?
  • Using XDCR to connect separate clusters in separate availability-zones?
MrYellow
  • 113
  • 5

1 Answers1

0

RZA and XDCR are for different purposes. RZA is part of the intra-cluster replication in Couchbase and XDCR is for inter-cluster replication.

All RZA does is keep the cluster's replica vBuckets (shards) in a different server group than where its primary vBuckets are. It is not automatic. You have to designate server groups, move or create nodes into those groups and then rebalance the cluster to move around the vBuckets, then maintain that list as you move nodes in and out of the cluster over time. For the multiple AWS Zones, if you had say six nodes in your cluster in US-West-2 for example, two nodes in each AZ. You would have three groups in Couchbase, with two nodes in each group, each group representing an AZ. Once you rebalanced, the corresponding replica vBuckets for the active vBuckets on the nodes in group 1 would always be in groups 2 or 3, and so on. The pictures in the docs would be good to refer to here. http://docs.couchbase.com/admin/admin/Concepts/concept-rack-awareness.html So RZA is just working in conjunction with the standard Couchbase intra-cluster replication for HA and fault tolerance.

XDCR on the other hand means you have two totally separate clusters, thus why I said inter-cluster replication. So you could use XDCR to replicate from cluster A in Region 1 to cluster B in Region 2 for DR purposes, uni-directional or between each, bi-directional You can run them active/active, with bi-directional replication, but you MUST be keenly aware of how conflict resolution is done today and make sure you code your application with that in mind and make sure the conflict resolution fits your use case. That conflict resolution is something that is actively being worked on to expand options for future versions of Couchbase, but for today there is only one style of conflict resolution. I have also seen people use XDCR with both clusters in the same region. One being the active one, the other being what backups are done from, reporting, or whatever. You can also use XDCR to integrate with ElasticSearch or Solr, but that is a different discussion. The most common use for XDCR I have seen is for Disaster Recovery replicating between datacenters. You will want to buy the Enterprise license IMO so you can use the encrypted XDCR though and configure your AWS VPC to allow the traffic to be routed between the regions correctly. Then like anything like this, monitor to make sure those links are always up, etc etc etc, but that is not unique to Couchbase.

Kirk
  • 206
  • 1
  • 3
  • XDCR for DR while better to use RZA for HA and fault-tolerance? Anything stopping either one from filling all those roles? XDCR would be used to get between AZs in Community 2.2. RZA or XDCR could fullfill the same role in Enterprise 2.5, while I can see how RZA would handle HA/fault-tolerance better without extra scripting or client side smarts. – MrYellow Oct 25 '14 at 04:51
  • It's been a while, but I'll respond to this as I have just seen it. XDCR and RZA are still very separate when it comes to consistency. RZA maintains strong consistency within a cluster while providing HA, whereas XDCR is eventually consistent across clusters. XDCR also allows you to get more overall copies of your data, spread geographically whereas RZA still only allows for a max of 4 copies (an active and 3 replicas) So no, one cannot replace the other and the serve different purposes. – Perry krug Apr 19 '17 at 10:09