By arjankuiper
Say I have server A and B that are both running a web server + software to detect web server failure. With this basic setup it would claim the elastic IP address whenever the other server is down.
This is all good and well, but how would I go about syncing data between servers? How would I deal with me uploading files to my ‘primary’ web server and have the other servers in the load balancing pool have those files as well?
I know there are possibilities like NFS, but I would like to hear from other, experienced, people how they (would) do this.
Thanks in advance, Arjan
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!
Run a continuous rsync between the servers to sync the webserver. There is a article here on how to downgrade your droplet, speaks about a nice way to rsync two servers. You will have to change it to only sync specific directories like webserver, /etc for configuration and certs and whatever else you need. You could potentially sync the database directories, but that is fraught with the risk of inconsistent syncs. Pick point two for this.
Setup MySQL or any other database you use as master and slave on the two machines. Basically, they will always be in sync.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.