Bridge Two Infinsipan Clustered Caches with RELAY2: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
===1.1 Declare the Bridging Cluster JGroups Stack=== | ===1.1 Declare the Bridging Cluster JGroups Stack=== | ||
Usually is TCP-based and a good name for it would be "tcp-relay": | |||
<pre> | |||
<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> | |||
</subsystem> | |||
</pre> | |||
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 <tt>initial_hosts</tt> 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: | |||
<pre> | |||
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> | |||
... | |||
<socket-binding name="jgroups-tcp" port="7600"/> | |||
<socket-binding name="jgroups-tcp-relay" port="7610"/> | |||
<socket-binding name="jgroups-tcp-fd" port="57600"/> | |||
<socket-binding name="jgroups-tcp-fd-relay" port="57610"/> | |||
... | |||
</socket-binding-group> | |||
</pre> | |||
===1.2 Declare the RELAY2 Protocol=== | ===1.2 Declare the RELAY2 Protocol=== |
Revision as of 23:31, 7 June 2016
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> </subsystem>
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" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}"> ... <socket-binding name="jgroups-tcp" port="7600"/> <socket-binding name="jgroups-tcp-relay" port="7610"/> <socket-binding name="jgroups-tcp-fd" port="57600"/> <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.
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>