ejabberd 15.11: Simpler cluster setup

This new version of ejabberd improves the cluster management to make it simpler to use. It fixes issues some may have faced when setting cluster with ejabberd 15.09 and 15.10.

Improvements

The commands join_cluster and leave_cluster do not depend on external scripts anymore. This makes operation simpler from user perspective and more portable across systems. The commands are supported on Microsoft Windows the same way as on Linux and OSX.

Adding a node to a cluster

Suppose you have already configured ejabberd on one node named ejabberd@node1. Let’s create an additional node ejabberd@node2 and connect them together.

  1. Copy the .erlang.cookie file from node1‘s home to node2‘s home.

  2. Start node2 node, and join it to the cluster:

    $ ejabberdctl start
    $ ejabberdctl join_cluster 'ejabberd@node1'
    $ ejabberdctl list_cluster
    ejabberd@node1
    ejabberd@node2
    

This enables ejabberd’s internal replications to be launched across all nodes so new node can start receiving messages from other nodes and be registered in the routing tables.

Removing a node from the cluster

Suppose you have already configured ejabberd cluster with nodes named ejabberd@node1 and ejabberd@node2 and you want to remove node1 from the cluster.
You just needs to shut down node1. There is no specific delay for the cluster to figure out that the node is gone, the node is immediately removed from other router entries.
If the node node1 is started again, it’s immediately attached back to the cluster until it has been explicitly removed permanently from the cluster.

To permanently remove node1 from the cluster, just call leave_cluster command from anywhere in your cluster (either node1 or node2):

$ ejabberdctl leave_cluster 'ejabberd@node1'

The removed node must be running while calling leave_cluster to make it permanently removed. It’s then immediately stopped.

Feedback

As usual, the release is tagged in the Git source code repository on Github.

The source package and binary installers are available at ProcessOne.

If you suspect that you’ve found a bug, please search or fill a bug report on Github.

3 thoughts on “ejabberd 15.11: Simpler cluster setup

Leave a Comment