ModAutoCluster, an ejabberd module for auto clustering nodes

Hello all!

I started working on an ejabberd module that takes care of autoclustering and its written in Elixir! It queries distributed configuration backends for nodes and joins the cluster. Processone says their Elixir support is still experimental, so this is very much a test library / toy for now.

This module will eventually support multiple backends, but currently it only supports Apache ZooKeeper. Plans are to support consul and etcd eventually.

Hows this different than libcluster? It looks like libcluster uses hardcoded nodes and is meant to be stand alone. It didn’t really fit my use case I believe.
Hows this different than rabbitmq_autocluster? Not sure, but that doesn’t look like it supports ZooKeeper and this is very ejabberd specific.

Anyways, you can check it out here:


Update here, I’ve added rudimentary support for etcd and polished the Zookeeper methodology.

What I am noticing is that if the ejabberd node can’t communicate to the cluster, but the backend can, then it will wipe all of the nodes of the cluster and create a second cluster. Will try to adjust this error in the future.

1 Like