0

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:

enter image description here

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?

threewordphrase
  • 173
  • 3
  • 13
  • 1
    Hi, I think your question would be better on [dba](http://dba.stackexchange.com/) or [serverfault](http://serverfault.com/) as stackoverflow is more oriented toward code questions. – bufh Jul 28 '15 at 21:22
  • Good call. I spend most of my time on SO and forget the other ones exist. Thank you! – threewordphrase Jul 28 '15 at 21:35

1 Answers1

0

After much research, I've found the answers. This is what's called a multi-master star topology, and it requires the hub (central) server to have several (>1) masters. MySQL <5.7 does NOT support this, however, MySQL 5.7 (currently in dev) has introduced the concept of channels. When you set CHANGE MASTER you can specify for which channel, allowing you to have multiple masters.

We did not want to use the dev version of MySQL, so we ended up using MariaDB which currently supports this in its general release (>10), albeit with a slightly different syntax. It works wonderfully.

threewordphrase
  • 173
  • 3
  • 13