此内容没有您所选择的语言版本。
27.3.2. Configure Cross-Data Replication (Library Mode)
When configuring Cross-Datacenter Replication, the
relay.RELAY2
protocol creates an additional stack (running parallel to the existing TCP
stack) to communicate with the remote site. If a TCP
-based stack is used for the local cluster, two TCP
based stack configurations are required: one for local communication and one to connect to the remote site.
In JBoss Data Grid's Library mode, cross-datacenter replication is set up as follows:
Procedure 27.2. Setting Up Cross-Datacenter Replication
Configure the Local Site
Add thesite
element to theglobal
element to add the local site (in this example, the local site is namedLON
).Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure JGroups for the Local Site
Cross-site replication requires a non-default JGroups configuration. Add thetransport
element and set up the path to the configuration file as theconfigurationFile
property. In this example, the JGroups configuration file is namedjgroups-with-relay.xml
.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the LON Cache
Configure the cache in siteLON
to back up to the sitesNYC
andSFO
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Back Up Caches
- Configure the cache in site
NYC
to receive back up data fromLON
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the cache in site
SFO
to receive back up data fromLON
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Add the Contents of the Configuration File
As a default, Red Hat JBoss Data Grid includes JGroups configuration files such asjgroups-tcp.xml
andjgroups-udp.xml
in theinfinispan-core-{VERSION}.jar
package.Copy the JGroups configuration to a new file (in this example, it is namedjgroups-with-relay.xml
) and add the provided configuration information to this file. Note that therelay.RELAY2
protocol configuration must be the last protocol in the configuration stack.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the relay.xml File
Set up therelay.RELAY2
configuration in therelay.xml
file. This file describes the global cluster configuration.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the Global Cluster
The filejgroups-global.xml
referenced inrelay.xml
contains another JGroups configuration which is used for the global cluster: communication between sites.The global cluster configuration is usuallyTCP
-based and uses theTCPPING
protocol (instead ofPING
orMPING
) to discover members. Copy the contents ofjgroups-tcp.xml
intojgroups-global.xml
and add the following configuration in order to configureTCPPING
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the hostnames (or IP addresses) inTCPPING.initial_hosts
with those used for your site masters. The ports (7800
in this example) must match theTCP.bind_port
.For more information about theTCPPING
protocol, see Section 24.3.1.3, “Using the TCPPing Protocol”