How to run WordPress across 2 VMs for high availability
Microsoft Azure requires that applications utilize two instances across multiple data centers in order to achieve their "high availability" SLA and ensure your sites don't go down for routine maintenance. They even tell you which pairs of data centers will never go for maintenance at the same time.
That's all well and good but how would you do this easily in practice for an app like WordPress with a MySQL database on the same VM? I'm no stranger to load balancing between two VMs but the database replication setup eludes me. We wouldn't want two versions of the data that could get out of sync. MySQL replication seems to require a master-slave setup which would fail to sync changes to the master DB if a user landed on the slave instance.
Am I just misunderstanding this concept? Any help is much appreciated!