[ejabberd] Multi node ejabberd cluster set up

Jonathan Tullett jonathan at rgmadvisors.com
Fri Dec 4 23:03:45 MSK 2009


I'm looking at deploying a clustered ejabberd setup at my company which 
will have, initially, 4 nodes in various locations around the world, all 
serving the same domain.

The idea is that users can connect to any node and will be able to 
communicate with any other user logged into any other node without issue.

I've tested this set up with Parallels on my machine here, and that part 
of communication works as advertised.

The questions I have are related to the mnesia database set up.  I've 
spent many hours reading mailing lists and the majority (all?) of 
cluster related setup questions involve just 2 nodes.

This is what we're looking for in an ideal set up:

1. all 4 nodes communicating and replicating.
2. the ability for any node (or 2 nodes) to drop out without it 
affecting the other nodes' communications (so if we lose 'B', people on 
'A','C' and 'D' can all still see each other and communicate)
3. for any dropped out node to reintegrate into the cluster without 
causing too much of a headache.

Following (slightly modified) instructions found at 
http://www.process-one.net/en/ejabberd/guide_en#htoc82, part 1 is 
working fine - with three nodes using one other as the master.

re point 2, I've found if the master node (the one passed as the ' 
-mnesia extra_db_nodes "['ejabberd at first']" \' param of the setup 
instructions) goes down, then the other nodes are unable to restart 

An apparent work around is to, on the database set up page of ejabberd, 
change all 'remote copy' databases to 'disk and local'.  Once done, 
they're able to restart.  I'm unable to find if this is the correct 
thing to do, or whether there's another solution (is it possible to 
specify more than a single master node? what happens if you specify 3, 
and one of those goes down?)

If multi-master isn't viable, is it possible to switch an instance to 
look at another node for the master copy?

Any ideas, pointers or help you can provide will be appreciated.


More information about the ejabberd mailing list