Just a second...

Configuring the Diffusion server to use replication

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.

  1. 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.
    • If configuration replication is enabled, authentication handler requests are routed across the cluster. Only one authentication handler needs to be configured for requests to be routed across the cluster. Multiple handlers can be used, however their configuration in Server.xml must be the same on all servers in the cluster.

      For more information, see Configuring authentication handlers.

  2. 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.
  3. Consider enabling Transport Layer Security for communication between servers. To achieve this, configure each server as follows:
    • First ensure the replication connector (specified by the <connector> element in Replication.xml) is configured with a key store.
    • Second, ensure the trust store used by the server contains a certificate chain that matches the certificates used by the servers in the cluster.
    • For example, if you are using the provided sample keystore, edit diffusion.sh to add the following to the command line:

      -Djavax.net.ssl.trustStore=${DIFFUSION_HOME}/etc/sample.keystore

    If the trust store does not contain an appropriate certificate chain, servers will reject connection attempts and log a PUSH-000081 message for the handshake failure.
    This will happen repeatedly unless the replication connector is configured to require TLS (that is, the <key-store> configuration has its mandatory attribute set to true), otherwise communication between servers will fall back to plain connections.
  4. 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.
  5. Restart the Diffusion server to load the configuration.
  6. Ensure that your clients are configured to reconnect if they lose their connection to the server.