A newer version of this documentation is available.

View Latest

XDCR advanced settings

XDCR advanced settings are internal settings available for configuration.

Advanced settings that can be updated include:

XDCR Protocol

The XDCR protocol defaults to version 2.

  • Version 1 uses the REST protocol for replication. If the Elasticsearch plug-in is used, choose version 1.

  • Version 2 uses memcached REST protocol for replication, a high-performance mode that directly uses the memcached protocol on the destination nodes. Choose version 2 when setting up a new replication with Couchbase Server 2.2 or later.

XDCR Source Nozzles per Node

This setting determines the number of XDCR source nozzles per node. This number must be less than or equal to the number of XDCR Target Nozzles per Node.

A small value of two or four is often sufficient. The default is two and the value range is 1-100. The CLI command for setting this value is provided in xdcr-replicate.

XDCR Target Nozzles per Node

This setting determines the number of XDCR target nozzles per node, and this number can be set higher if the target nodes have high processing power. The default is two and the value range is 1-100.

The setting XDCR Target Nozzles per Node affects the level of concurrency as follows:

Number of concurrent workers writing to the target cluster  =
XDCR Target Nozzles per Node * <Number of Nodes in Target Cluster>
The setting for XDCR Source Nozzles per Node must be less or equal to XDCR Target Nozzles per Node. Otherwise, more mutations per second are received by XDCR than it can send to the target node. This can lead to mutations piling up in the XDCR queue and to DCP backing off, which results in a slow drain rate.
XDCR Checkpoint Interval

The Checkpoint Interval does not affect the persistence of actual data. During that time, XDCR computes and persists checkpoint documents, which contain the high sequence number for each vBucket that was successfully replicated to the target cluster.

If the replication is restarted by user or recovers from an error, the checkpoint documents can be used to determine the starting point of t he replication to avoid unnecessary work. The shorter the interval, the more accurate the checkpoint documents will be and the less unnecessary work will be needed at the replication restart. The computation and persistence of checkpoint documents use considerable system resources and may impact XDCR performance if they are performed too frequently. A tradeoff is needed to determine the optimal value for the users.

XDCR Batch Count

Document batching count, 500 to 10000. Default is 500. In general, increasing this value by 2 or 3 times will improve XDCR transmissions rates since larger batches of data will be sent in the same timed interval. For unidirectional replication from a source to a destination cluster, adjusting this setting by 2 or 3 times will improve overall replication performance as long as persistence to disk is fast enough on the destination cluster. Note however that this can have a negative impact on the destination cluster if you are performing bi-directional replication between two clusters and the destination already handles a significant volume of reads/writes.

XDCR Batch Size (kilobytes)

Document batching size, 10 to 100000 (kilobytes). Default is 2048. In general, increasing this value by 2 or 3 times will improve XDCR transmissions rates since larger batches of data will be sent in the same timed interval. For unidirectional replication from a source to a destination cluster, adjusting this setting by 2 or 3 times will improve overall replication performance as long as persistence to disk is fast enough on the destination cluster. Note however that this can have a negative impact on the destination cluster if you are performing bi-directional replication between two clusters and the destination already handles a significant volume of reads/writes.

XDCR Failure Retry Interval

This interval is the time that XDCR waits before it attempts to restart replication after a server or network failure. The interval for restarting a failed XDCR is 1 to 300 seconds (default 10): if you expect more frequent network or server failures, you may want to set this interval to a lower value.

XDCR Optimistic Replication Threshold

This option improves XDCR latency and represents the compressed document size in bytes that spans from 0 to 20MB (default is 256 Bytes). XDCR will get metadata for documents larger than this size on a single time before replicating the uncompressed document to a destination cluster.

XDCR Statistics Collection Interval

Shows how often XDCR Statistics is updated.

XDCR Logging Level

The log level for the replication. It can be Error, Info, Debug or Trace