What is the best way to synchronize data and databases across droplets for global traffic direction?

I am trying to configure 3 servers to be placed around the world for quicker response time though how can I keep the data identical across all machines say I was running a wordpress or ghost website? And of course having this process automated

Thank you

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.


I am currently working on something like this. For WordPress and WHMCS. It is hard, but not impossible. There are several routes that you can take in achieving this. The only problem I have at the moment is storage replication/synchronizing between data centers. In my case this has to be almost real time due to the nature of the app. If you can live with some latency (5 minutes) you can try lsync+unison to sync your files on changes.

For database replication I went for a Percona Galera Cluster with a master in each datacenter. The setup is quite easy. This article is a good starting point: (Small tip that will save you hours of troubleshooting: Stop every mysql instance on every node if you bootstrap your cluster, otherwise mysql won’t start)

Your visitors will need to be directed to the right server, this can easily be done with GeoDNS. You have two options here. Work with your own DNS servers (Look for docker/cookood, Powerdns or Bind on google) or a managed DNS provider. For simplicity and testing I recommend the last option. Rage4DNS and edgedirector are a solid and fairly priced GeoDNS providers.

To make things a bit more secure and to encrypt traffic between your servers, I have created a Tinc mesh network. Search for Ansible Tinc on DigitalOcean and you will find an awesome tutorial explaining how to achieve and automate this.

I am writing an article about this, when it is finished I’ll keep you updated. It will be an in depth explanation about a high available globally distributed WordPress Multisite with GeoDNS. As I said before, it is hard and it will take a long time to make this setup work.