MariaDB Master-Master the way to go? Failover advice
I have an application that does not support an automatic secondary SQL server to try, so I would like to use MariaDB replication. I would like to do something along these lines:
2 databases - Master - Slave.
1 Floating IP through Linode failover.
The server that has the floating IP must always be the master, and the server that doesn't have the floating IP be the slave. e.g. say the master fails, IP is switched to the slave db, mysql starts listening on that interface and now acts as a master. In the meantime, master (which should now be a slave) will come back up. Then, when the new master fails at some point, IP's are switched again and the original master becomes master once again, and the other node switches back to slave once it recovers and sees it no longer has the floating IP.
Is this a good way of doing things? Is it doable? If anyone has pointers for the tools I will need to implement it or point to a tutorial that'd be great.