I currently have an ejabberd server running at domain A
. It has a bunch of users with accounts like xyz@A
. I want to setup alternative servers so that if A
is down, clients can transparently use alternative servers B
and C
(thus, while still using their xyz@A
account).
The DNS part I think is pretty simple, I need to edit A
zone file to add SRV
records of the alternative servers like in this example (http://wiki.xmpp.org/web/SRV_Records#Example_3):
_xmpp-client._tcp.example.net. 86400 IN SRV 5 50 5222 server1.example.net.
_xmpp-client._tcp.example.net. 86400 IN SRV 10 30 5222 server2.example.net.
_xmpp-client._tcp.example.net. 86400 IN SRV 10 10 5222 server3.example.net.
_xmpp-client._tcp.example.net. 86400 IN SRV 10 10 5222 server4.example.net.
_xmpp-client._tcp.example.net. 86400 IN SRV 15 0 5222 backup.example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 5 50 5269 server1.example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 10 30 5269 server2.example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 10 10 5269 server3.example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 10 10 5269 server4.example.net.
_xmpp-server._tcp.example.net. 86400 IN SRV 15 0 5269 backup.example.net.
What are the steps and specific configuration to setup the ejabberd servers on host B
and C
w.r.t authentification and chatrooms?
Although working redundant servers with the initial user db of A
will be enough (I don't expect A to be down for a long time), ideally I think I should sync the user db between all 3 servers so that if someone makes an account on B
while A
is down can later log on A
when it is back up. Does ejabberd provide a mechanism for that?
edit: The solution needs to work with these constraints/use-case:
- you can connect to any node of the cluster transparently
- works if at least one of the node is up (no single point of failure)
- works over the internet (potentially high latency)