XDCR in Cloud Deployments
XDCR (Cross Datacenter Replication) is used to replicate data between deployed clusters in the cloud.
- Use a public DNS names and public IP addresses
- You can use 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 be resolved internally within the cluster, but it will allow external communication.
In Amazon EC2, for example, make sure that the following is set up:Configure the cluster with a fixed IP address and the public DNS name according to the recommendations for using Couchbase Server in the cloud.
- The public interface in your instance configuration is enabled.
- Security parameters allow communication to the required ports.
- The public DNS record exposed by Amazon is used as the reference name.
- Use a DNS service
Use a DNS service to identify or register a
CNAME that points to the public DNS address of each node within 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. When the CNAME records are updated, replication should be able to persist over a public, internet- based connection, even though the individual IP of different nodes within each cluster is 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.