We are working on a new system architecture for our company. We have a HPC, which runs in our own data-center and we are planning our front-end and a fallback system on Amazon Web Service.

System Architecture:

System Architecture


  • The HPC cluster has a lot of write operations
  • Website and API both read the data most of the time and write rarely
  • Ping from AWS to our cluster is ~35ms
  • In case of our local data-center failing, the HPC should be replicated on AWS, turning the MySQL Slave into the new Master


What is the best solution to replicate the MySQL database in such a setup?

1 Answer 1


There are three(3) suggestions I have that you may want to look into...


You could use MySQL 5.5 both locally and in AWS. You would also setup Semisync Replication. That way, every SQL statement executed on the Master has its latest recorded SQL statement sent over to the Slave.

In my past post (Jul 26, 2012 : Mysql database replication on different vlan/subnet/another site) I had recommended SemiSynchronous Replication over a geographic distance. Interestingly, @AaronBrown points out by experimentation that High Latency would degrade Semisynch Replication (See his blog on this one).


If all your data is InnoDB, you could use Percona XtraDB Cluster (preferable to have two Slaves in AWS but one would do). Why Percona XtraDB Cluster? You have synchronized writes. You only major bottleneck would strictly be network communication (again High Latency would have an adverse affect)

Here are my past posts on using Percona XtraDB Cluster


If you want to strengthen each data center's local copy of the data, I would suggestion using DRBD, not over a geographic distance, but having a DRBD cluster in each data center. In your case, at least have DRBD in the local data center.

Here is my past post on this suggestion :

  • Thank you very much for your suggestions. I will try to setup a Master-Master asynchronous replication, with each database having only one node as the master (the HPC and the front-end don't need to write to the same databases)
    – Thomas
    Aug 21, 2012 at 9:37
  • The guy with the blog in suggestion 1 didn't use multiple threads for his test. There is nothing wrong with suggestion 1 if you don't mind an insert taking latency+ ms to return.
    – Craftables
    Jun 3, 2017 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.