By vWeb
Hi, a beginner question on the load balancer. I read the documentation but some information escapes me.
I have 2 droplets in the private network (ubuntu 18.04):
I want them both to have a load balancer, so I’d buy 2.
Do I have to buy 2 identical droplets (same CPU, RAM, SSD)?
On both droplets the information changes continuously: do you have to manually synchronize the droplet and its “clone” in load balancing? If yes, how?
If I add a block storage volume to the first droplet to manage the “var / www” folder, do I need to add and sync a volume on the clone as well?
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!
Thanks Bobby, very clear.
If I want to create a complete failover for the web server droplet (classic Droplet with Plesk), what strategy do you recommend? Is there anything similar to the cluster we created for the database?
Hello,
I’ll try to answer your questions in order:
That is pretty much it for the web servers. Just make sure that you have some kind of caching like redis to save your sessions in so that your users don’t loose their sessions everytime they are forwarded to a different droplet.
If you want to load balance your SQL servers as well, then things get a bit more challenging. You could try using standard master to master replication but be aware of dead locks… Or you could try using something like a Galera cluster instead. Here’s how to setup those:
Galera Cluster on Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-configure-a-galera-cluster-with-mariadb-on-ubuntu-18-04-servers
Galera Cluster on Centos 7: https://bobbyiliev.com/blog/galera-cluster-mariadb-10-1-on-centos-7-server
Hope that this helps!
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.