You can configure replication by editing the
etc/Replication.xml files of your
Diffusion™
servers.
Ensure that you use the same replication configuration on all of the
Diffusion
servers in your cluster.
Ensure that each server in the cluster has a unique name, as set in etc/Server.xml or the host name
if not set.
Configuration items (topic views, metric collectors,
and the security/system authentication stores) are replicated if any form of replication is enabled.
-
Edit the Replication.xml file to configure
replication.
<replication>
<provider>HAZELCAST</provider>
<customConfigurator/>
<connector>High Volume Connector<connector>
<sessionReplication enabled="true" />
<topicReplication enabled="true">
<topics>
<excludes>Diffusion</excludes>
</topics>
</topicReplication>
</replication>
- In the sessionReplication element, set
enabled to true to configure the
server to replicate sessions between servers in the cluster.
- In the topicReplication element, set
enabled to true to configure the
server to replicate topics between servers in the cluster.
- If either session or topic replication is enabled, configuration items are replicated. To enable
configuration replication without session/topic replication, add a configurationReplication
element and set its enabled property to true.
-
In the etc/Connectors.xml file, check there is a connector element with the same name as the
connector specified in Replication.xml.
By default, Connectors.xml contains a "High Volume Connector" profile which you can
use for replication. You should tune the profile based on your particular requirements.
-
Consider adding a quorum element inside the replication element.
This defines a minimum number of servers in a cluster, below which all servers will shut down.
Using this setting can
prevent issues after a network partition separates a cluster, and the two resulting clusters try to rejoin,
leading to inconsistent data (a "split-brain" condition). See
Server clusters for high availability for details.
-
Restart the
Diffusion
server to load the
configuration.
-
Ensure that your clients are configured to reconnect if they lose their
connection to the server.