27.3. Configure Cross-Datacenter Replication
27.3.1. Configure Cross-Datacenter Replication (Remote Client-Server Mode)
In Red Hat JBoss Data Grid's Remote Client-Server mode, cross-datacenter replication is set up as follows:
Procedure 27.1. Set Up Cross-Datacenter Replication
Set Up RELAY
Add the following configuration to thestandalone.xml
file to set upRELAY
:<subsystem xmlns="urn:jboss:domain:jgroups:1.2" default-stack="udp"> <stack name="udp"> <transport type="UDP" socket-binding="jgroups-udp"/> ... <relay site="LON"> <remote-site name="NYC" stack="tcp" cluster="global"/> <remote-site name="SFO" stack="tcp" cluster="global"/> <property name="relay_multicasts">false</property> </relay> </stack> </subsystem>
TheRELAY
protocol creates an additional stack (running parallel to the existingTCP
stack) to communicate with the remote site. If aTCP
based stack is used for the local cluster, twoTCP
based stack configurations are required: one for local communication and one to connect to the remote site. For an illustration, see Section 27.2, “Cross-Datacenter Replication Operations”Set Up Sites
Use the following configuration in thestandalone.xml
file to set up sites for each distributed cache in the cluster:<distributed-cache> ... <backups> <backup site="{FIRSTSITENAME}" strategy="{SYNC/ASYNC}" /> <backup site="{SECONDSITENAME}" strategy="{SYNC/ASYNC}" /> </backups> </distributed-cache>
Configure Local Site Transport
Add the name of the local site in thetransport
element to configure transport:<transport executor="infinispan-transport" lock-timeout="60000" cluster="LON" stack="udp"/>