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.

