With Couchbase Server 3.0, we have introduced a great new protocol for data synchronization named DCP (database change protocol). DCP powers many facilities within Couchbase Server including maintaining replicas, rebalance, node recovery, back-ups, indexing all the way to XDCR replication. It essentially sits at the heart of our architecture and pumps blood to the rest of the body.
With earlier version of the product, as mutations arrive on the nodes of the source cluster, they are queued for disk persistence and replication to other nodes. Once disk persistence is achieved, XDCR replicator detected the mutations by reading back the mutations from disk and are replicated to the destination cluster. The latency of XDCR replication depends on a number of factors but in Couchbase Server 2.x, one big factors is how fast you could persist mutations to disk. Disk IO is not fast! It certainly isn’t ‘memory’ fast.
With the new version 3.0, with help of DCP, XDCR detects mutations directly by initiating a DCP stream. As mutations arrive DCP help intra cluster replication as well as XDCR replicators that pick up the mutation and replicate to destination cluster. Streaming and memory is fast! And that is our magic for getting XDCR latencies up to 4x lower.
For those who are using XDCR for High availability and disaster recovery, it means we can get your changes to the safety of another cluster in another data center faster. That means you are better protected against cluster wide failures such as regional disasters that take out a whole data center. For those who are using XDCR for data locality for their global deployments, it means we can make the data available around the globe faster.
Before I close, I should note one thing; Performance data is always tricky to report. It is important to note that absolute latency with XDCR depend on a lot of factors. Factors for latency include network bandwidth, ‘ping’ latency between cluster, computational capacity available to process mutations on source and destinations and more… For the most precise data point, give Couchbase Server 3.0 a spin and let us know! Download it here: couchbase.com/download