Disclaimer: I've never worked with replication before, but I'm doing all my research. Not really having a bunch of in-depth knowledge about MySQL makes a lot of the documentation hard to understand.
We have a remote server, and many 'onsite' servers. This app is mission-critical, and because of the unreliable internet connections on site, the onsite machines have fully functional instances of the application. Onsite machines are behind various firewalls and generally are not able to access each other. We can set up SSH tunnels to allow the cloud DB to communicate with the onsite DBs.
Here's a simple diagram:
Async Multi-Master replication seems to be the best bet for us, but most of the documentation seems to imply that multi-source replication only works for slaves and/or multi-master replication only works circularly and a single master (in this case, the cloud server) can not replicate directly to multiple other masters.
Am I interpreting this incorrectly (merely unable to find documentation on how to do this), or is this the case? If it's the case, are there are 3rd party packages like Tungsten or Galera we can use? We would prefer to use as vanilla MySQL as possible, though.
Edit for clarification: Here's a my.cnf section I found describing a 2-master setup. I'd like to set N number of these on the cloud server, and just one each (the cloud server) on the onsite servers. We'd like to do everything through my.cnf and avoid using/scripting mysql shell commands.
master-host = 192.168.16.4
master-user = replication
master-password = slave
master-port = 3306