Question

How to Sync two droplets on automate...?

Hey,

Right now i’m using single droplet but now i want to make 2 droplet with load balancing… and im using PHP + Mysql web application with DOMAIN so could you please tell me how to i configure or what i do best to make Auto Sync like if any new record Insert in DATABASE that will me auto update in second droplet without any manual steps…?

is there any way to handle this…?

waiting your reply

Regards…


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.

Thank you for reply… as per your reply i like this way but with this i also want Files and Images Sync system to 1 droplet to and other Automatically… basically i have deploy a PORTAL that use multiple clients and Agents so if i move to Load balance there only 1 issue how to update both in same time… like if i change or modify or any Agent/Client upload any Images then this images should be sync in Both Droplet… if you got my point what im trying to say so possible have any way to Auto…?

Regards, Thanks

Hello, @numantahir1

What you can do is to setup a database replication between the two droplets. In this way the records will be replicated between the two databases as per your request.

You can have a look at our existing tutorial for the Master-Slave replication in MySQL:

https://www.digitalocean.com/community/tutorials/how-to-set-up-master-slave-replication-in-mysql

One thing to keep in mind is to backup your data before starting and also taking a snapshot of your droplet as well. In this way if anything goes offhand you can quickly restore it backup to how it was.

Regards, Alex