Specifying a Cluster's Name
- A cluster name is a user-defined name that uniquely identifies a cluster from other clusters that run on the network.
- Cluster members must specify the same cluster name to join and cluster.
- A cluster member does not start if the wrong name is specified when attempting to join an existing cluster.
- A unique cluster name is often used with a unique multicast port to create distinct clusters on the same network.
To specify a cluster name
<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/
coherence-operational-config coherence-operational-config.xsd">
<cluster-config>
<member-identity>
<cluster-name system-property="tangosol.coherence.cluster">MyCluster
</cluster-name>
</member-identity>
</cluster-config>
</coherence>
The
tangosol.coherence.cluster system property is used to specify the cluster name instead of using the operational override file. For example:-Dtangosol.coherence.cluster=name
You can set this in your run.sh file as JAVA_OPTS.
Configuring Multicast Communication
Multicast communication is configured in an operational override file(tangosol-coherence-override.xml) within the
<multicast-listener> node.Specifying a Cluster's Multicast Address
- A multicast address (IP address and port) can be specified for a cluster member
- Cluster members must use the same multicast address and port to join and cluster
- Distinct clusters on the same network must use different multicast addresses.
To specify a cluster multicast address, edit the operational override file and add both an
<address> and <port> element and specify the address and port to be used by the cluster member. For example:<?xml version='1.0'?>
<coherence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-operational-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/
coherence-operational-config coherence-operational-config.xsd">
<cluster-config>
<multicast-listener>
<address system-property="tangosol.coherence.clusteraddress">224.3.6.0
</address>
<port system-property="tangosol.coherence.clusterport">3059</port>
</multicast-listener>
</cluster-config>
</coherence>
The
tangosol.coherence.clusteraddress and tangosol.coherence.clusterport system properties are used to specify the cluster multicast address instead of using the operational override file.
For example:
-Dtangosol.coherence.clusteraddress=224.3.6.0 -Dtangosol.coherence.clusterport=3059
No comments:
Post a Comment