By Matt Burdett
Say I have a Wordpress blog that is getting so much traffic. So much so, that my Apache server cannot keep up with the requests. To mitigate these timeouts due to large numbers of requests, I look at a DigitalOcean load balancer.
What I would like clarification on, is if I have 3x $10 droplets of the same setup, and 1x Digitalocean load balancer distributing the traffic between the 3, - if I simply go to my website and write a blog, presumably my requests are handled by 1 of the 3 servers , my question is this: how does DigitalOcean’s load balancers ensure that the MySQL databases holding Wordpress post and user data, keep everything in sync?
If I write a post or create a new user on “LON1-001” server , does the loadbalancer update “LON1-002” and “LON1-003” servers? Apologies but I am new to load balancing.
Thanks
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!
moving mysql to another droplet will not increase latency and loading? becuase it’s another server with different IP
A load balancer would be setup to distribute the incoming request for your website to the three web servers that you mentioned.
In this kind of a setup, you would want to separate out your Database so that it isn’t running on any of the web servers and instead move it to a separate droplet, that is just running the DB alone.
Then each of your web servers would have their own credentials to connect to your MySQL instance running on the Database droplet.
This way when you distribute your HTTP traffic to each of the webservers, they are all accessing the same DB and that is where content is kept in sync, because it is a single database that is reading and writing data for the three web servers.
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.