Report this

What is the reason for this report?

How to Sync two droplets on automate...?

Posted on July 12, 2020

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…



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!

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.

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

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.