For those who run #ProsodyIM as #xmpp server, I did something simple but effective in my failover architecture:

  • 2 Prosody instances in two different regions in a datacenter
  • lsyncd syncing from primary to stand by instance all data
  • an entrypoint script supervising Prosody execution
  • a lock file controlling if entrypoint script can up Prosody
  • a daemon checking if floating ip is linked to hosts and controlling the lock file and the lsyncd execution and configuration to primary/standby modes

Perfect solution? Of course not.
Effective solution? Hell yeah.

 

#xmpp #failover #container #vrrp #prosodyim #prosodyim

@isadora

Very interesting. I did not know about lsyncd.

What I have been doing lately for redundancy is running the server in a VM. The host server uses ZFS. This allows me to take a snapshot, e.g. every 6 min, and send to the replica. I found this method to be extremely efficient to maintain a replica of a VM with just a few min of delay.

I heard about this method in the podcast '2.5 Admins', not my idea!

I manually start the replica server in case necessary. But I was thinking about using keepalived, which I have used in other scenarios.