XDCR in cloud deployments
XDCR (Cross Datacenter Replication) is used to replicate data between deployed clusters in the cloud.
To replicate between two or more clusters that are deployed in the cloud, keep in m ind these configuration requirements:
- Use a public DNS names and public IP addresses
- You can use a public DNS names and public IP addresses for nodes in your cluster. Cloud services support the use of a public IP address to allow communication to the nodes within the cluster. Within the cloud deployment environment, the public IP address will resolve internally within the cluster, but allow external communication.
- In Amazon EC2, for example, ensure that you have enabled the public interface in your instance configuration, that the security parameters allow communication to the required ports, and that public DNS record exposed by Amazon is used as the reference name.
- Configure the cluster with a fixed IP address and the public DNS name according to the recommendations for using Couchbase in the cloud.
- Use a DNS service
- You can use a public DNS names and public IP addresses for nodes in your clusters. Use a DNS service to identify or register a CNAME that points to the public DNS address of each node within the cluster. This will allow you to configure XDCR to use the CNAME to a node in the cluster. The CNAME will be constant, even though the underlying public DNS address may change within the cloud service.
- The CNAME record entry can then be used as the destination IP address when configuring replication between the clusters using XDCR. If a transient failure causes the public DNS address for a given cluster node to change, update the CNAME to point to the updated public DNS address provided by the cloud service.
- By updating the CNAME records, replication should be able to persist over a public, internet- based connection, even though the individual IP of different nodes within each cluster configured in XDCR.
For additional security, you should configure your security groups to allow traffic only on the required ports between the IP addresses for each cluster. To configure security groups, you must specify the inbound port and IP address range. You must also ensure that the security includes the right port and IP addresses for the remainder of your cluster to allow communication between the nodes within the cluster.