Bridge Two Infinsipan Clustered Caches with RELAY2
Jump to navigation
Jump to search
External
- RedHat JDG Manual Cross-Datacenter Replication https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.6/html/Administration_and_Configuration_Guide/chap-Set_Up_Cross-Datacenter_Replication.html
Internal
Relevance
- JDG 6.6
Procedure
1. JGroups Configuration
1.1 Declare the Bridging Cluster JGroups Stack
Usually is TCP-based and a good name for it would be "tcp-relay":
<stack name="tcp-relay"> <transport type="TCP" socket-binding="jgroups-tcp-relay"/> <protocol type="TCPPING"> <property name="initial_hosts"> 172.31.22.188[7610],172.31.17.76[7610],172.31.27.239[7610],172.31.30.82[7610] </property> <property name="num_initial_members"> 2 </property> <property name="port_range"> 0 </property> <property name="timeout"> 2000 </property> </protocol> <protocol type="MERGE3"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd-relay"/> <protocol type="FD_ALL"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="pbcast.NAKACK2"> <property name="use_mcast_xmit"> false </property> </protocol> <protocol type="UNICAST3"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="MFC"/> <protocol type="FRAG2"/> </stack>
Note that the configuration of the relay JGroups stack must be identical on all nodes across all clusters that will be relaying to each other.
The TCPPING initial_hosts value must contain addresses from all the local clusters.
The stack definition refers two new socket bindings ("" and "") which must be different from the main JGroups stack's bindings:
<socket-binding-group name="standard-sockets" ...> ... <socket-binding name="jgroups-tcp" port="7600"/> <socket-binding name="jgroups-tcp-fd" port="57600"/> <socket-binding name="jgroups-tcp-relay" port="7610"/> <socket-binding name="jgroups-tcp-fd-relay" port="57610"/> ... </socket-binding-group>
1.2 Declare the RELAY2 Protocol
Declare the RELAY2 protocol that refers to the bridging cluster JGroups stack. The RELAY2 protocol is the place the name of the local cluster (site) is declared:
2. Infinispan Configuration
2.1 Declare The Local Clusters (Sites) a Cache Wants to Relay To
<distributed-cache> <!-- Additional configuration elements here --> <backups> <backup site="{FIRSTSITENAME}" strategy="{SYNC/ASYNC}" /> <backup site="{SECONDSITENAME}" strategy="{SYNC/ASYNC}" /> </backups> </distributed-cache>