mysql 4 masters in different location
There is no &quot;perfect&quot; solution to your requirements, but see if MariaDB with Galera is &quot;good enough&quot;:

Have 4 or more geographically separated nodes.
If a &quot;quorum&quot; of the nodes (more than 50%) stay connected to each other, they stay in sync -- usually within seconds.
If, say, 3 nodes are talking to each other, but you are connecting to the 4th node (which can't see the other 3), you won't be able to write.  Having a proxy try to reach a writable node will sometimes solve this situation.
If there are multiple network problems, the &quot;cluster&quot; will fix itself after the network is healed.  Meanwhile you can't write.

NDB Cluster replicates via &quot;eventual consistency&quot;.  This allows different nodes to be written independently, as you have with a flakey network.