Friday, 19 October 2012

ejabberd clustering: a clever idea for Mnesia replication setup

The process of configuring a cluster of ejabberd entities serving the same domain is apparently simple (considering the ejabberd Installation and Operation Guide).

Assuming you have a node running, you create a second node with the same Erlang cookie, then setup Mnesia replication between the two. Assuming both ejabberd instances have a similar configuration setup and can connect to each other over the network, you're pretty much done.
This can be generalized and made N times to build your cluster.

ejabberd uses Mnesia as its internal DB. Although you can easily move to MySQL as storage backend, it's important to note that  Mnesia is still necessary to successfully build the cluster.

ejabberdctl is the control script that can be used to start, stop, restart ejabberd. It can be also used to attach a debug console to a running ejabberd instance, or execute any command exposed by an ejabberd module.

The idea presented in Easy ejabberd clustering procedure is to extend ejabberdctl with an additional command ("attach") which hides the complexity of connecting to an Erlang node and setup Mnesia replication. I've found it an interesting idea, firstly because it becomes easier to automate the clustering configuration, secondly because goes in the right direction of hiding the setup complexities behind a single control tool.


No comments:

Post a Comment

Wireshark setting to interpret UDP as RTP automatically

 Before I forget again, a Wireshark setting that can help saving time by trying to interpret any UDP as RTP, if possible: Analyze --> Ena...