Bridge Two Infinsipan Clustered Caches with RELAY2: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 52: Line 52:
                 <protocol type="FRAG2"/>
                 <protocol type="FRAG2"/>
             </stack>
             </stack>
        </subsystem>
</pre>
</pre>



Revision as of 23:38, 7 June 2016

External

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-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>

2.2 Configure the Local Cluster Transport