Traffic between the clusters
Traffic between the source cluster and the destination cluster is managed with permits, priority, and configurable behavior for multi-datacenter operation.
Permits
Traffic between the source cluster and the destination cluster is managed with permits. When a permit cannot be acquired, the message is postponed and waits in the replication log until it is processed when a permit becomes available. Permits are global and not per destination.
dse advrep
conf
:dse advrep conf update --permits 1000The default is 1024.
Channel with a higher priority will take precedence in acquiring permits. Permits are required to transmit data from a source to a destination.
Priority and FIFO/LIFO enablement
The commit log is flushed from memory to disk, writing the data to the appropriate table. A
Capture-Data-Change (CDC) collection agent additionally filters the data written and creates
replication log files on disk. Each channel source table will have a separate data directory
created on disk into which data is appended each time the commit log is flushed, storing all the
messages that are to be replicated to a destination. Several replication log files may exist per
source table at any given time. Each file stores a contiguous time-slice, configurable with
dse advrep conf update
command and the
--collection-time-slice-width
option (default: 60 seconds). A CDC transmission
agent then sends the messages stored in the replication log files to the destination, where the
data is processed and written to the appropriate database table. The order in which source table
data is transmitted can be altered with the priority
option when creating a
channel, and the order in which a source table's replication log files are read can be tuned
with the --fifo-enabled
and --lifo-enabled
options.
dse advrep --host 192.168.3.10 channel create --source-keyspace foo --source-table bar --source-id source1 --source-id-column source_id --destination mydest --destination-keyspace foo --destination-table bar --collection-enabled true --priority 1 --lifo-enabledThis example sets the channel for table foo.bar to the top priority of one, so that the table's replication log files will be transmitted before other table's replication log files. It also sets the replication log files to be read from newest to oldest.
Configure automatic failover for hub clusters with multiple datacenters
DSE Advanced Replication uses the DSE Java driver load balancing policy to communicate with the hub cluster. You can explicitly define the local datacenter for the datacenter-aware round robin policy (DCAwareRoundRobinPolicy) that is used by the DSE Java driver.
- driver-local-dc
- For destination clusters with multiple datacenters, you can explicitly define the name of the datacenter that you consider local. Typically, this is the datacenter that is closest to the source cluster. This value is used only for clusters with multiple data enters.
- driver-used-hosts-per-remote-dc
- To use automatic failover for destination clusters with multiple datacenters, you must define the number of hosts per remote datacenter that the datacenter aware round robin policy (DCAwareRoundRobinPolicy) considers available.
- driver-allow-remote-dcs-for-local-cl
- Set to true to enable automatic failover for destination clusters with multiple datacenters. The value of the driver-consistency-level parameter must be LOCAL_ONE or LOCAL_QUORUM.
LOCAL_QUORUM
,
use dse advrep destination
update
:dse advrep destination update --name mydest --driver-allow-remote-dcs-for-local-cl true --driver-consistency-level LOCAL_QUORUM Destination mydest updated Updated driver_allow_remote_dcs_for_local_cl from null to true Updated driver_consistency_level from ONE to LOCAL_QUORUM