By Rufus Tang
So far we have a Varnish droplet to serve as a load balancer to 2 Nginx droplets. And, we use asw s3 to store all the uploaded media files. Varnish droplet direct all logged in users(wp-admin) to the first Nginx droplet (we call it master droplet). The problem now if we made change to master droplet(for example: code deployment, new sub site registration), it doesn’t sync to the other Nignx droplet.
What is the best way to keep those Nginx in sync?
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!
Please don’t duplicate your posts. <a href=“https://www.digitalocean.com/community/articles/how-to-configure-a-clustered-web-server-with-varnish-and-nginx-on-ubuntu-13-10”>https://www.digitalocean.com/community/articles/how-to-configure-a-clustered-web-server-with-varnish-and-nginx-on-ubuntu-13-10</a>
@kamal - the answer you’re linking to does not cover actual syncing of content between the servers.
@tangrufus - I’d go with lsyncd (or even simpler, rsync on a cron schedule)
http://tjstein.com/articles/live-data-replication-using-lsyncd/
Cheers, ~Dave
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.