XDR Set Replication Setup

The Aerospike Knowledge Base has moved to https://support.aerospike.com. Content on https://discuss.aerospike.com is being migrated to either https://support.aerospike.com or https://docs.aerospike.com. Maintenance on articles stored in this repository ceased on December 31st 2022 and this article may be stale. If you have any questions, please do not hesitate to raise a case via https://support.aerospike.com.

Synopsis

XDR Set Replication Setup

XDRs set replication has two modes of operation, whitelisting and blacklisting. With whitelisting XDR will only replicate a set when there is an explicit rule in the configuration to do so. Blacklisting requires a rule to not replicate, otherwise all sets will be replicated to the remote cluster/s.

Configuring Set Whitelisting

To configure set whitelisting, make the following configurations:

  1. Set enable-xdr to true for the namespaces to be replicated.
  2. Configure one or more remote data centers to replicate data to.
  3. Set sets-enable-xdr to false, this instructs XDR to require a namespace to be whitelisted to allow a set to replicate.
  4. For each set that needs replication, set set-enable-xdr to true in the set sub-context.

To prevent a set from replicating, set set-enable-xdr to false in the set sub-context

namespace <namespace-name> {
  enable-xdr true # Enable replication for this namespace.
  # List of datacenters to replicate data to. xdr-remote-datacenter <datacenter-name-1> xdr-remote-datacenter <datacenter-name-2>
  sets-enable-xdr false # Do not replicate sets unless instructed. ...
  set <set-name-1> {
    set-enable-xdr true # Replicate this set (whitelisted).
    ...
  }
  set <set-name-2> {
    # without "set-enable-xdr true" this set *will not* replicate. ...
  }
}

Configuring Set Blacklisting

To configure set blacklisting, make the following configurations:

  1. Set enable-xdr to true for the namespaces to be replicated.

  2. Configure one or more remote data centers to replicate data to.

  3. Set sets-enable-xdr to true, this instructs XDR to require a namespace to be blacklisted to prevent the set from replicating.

     namespace <namespace-name> {
         enable-xdr true # Enable replication for this namespace # List
                         # of datacenters to replicate data to.
                         # xdr-remote-datacenter <datacenter-name-1>
                         # xdr-remote-datacenter <datacenter-name-2>
         sets-enable-xdr true # Replicate all sets unless instructed not to. ...
         set <set-name-1> {
             # without "set-enable-xdr false" this set *will* replicate
             ...
         }
         set <set-name-2> {
             set-enable-xdr false # Do not replicate this set (blacklisted). ...
         }
         ...
     }
    

Applies To

Server prior to v. 5.0