Question

Load Balancer Drupal Configure for Beginner

Very new to load balancing here and doing my research before making the plunge. Right now I have a single server running Drupal 7. It’s using complex mysql queries and hosts a large amount of user uploaded images. To prepare for the future and continued expansion I’m looking at the following setup. Wondering if this makes sense, and any suggestions on tools to get the job done:

Public Application (Private) Database (Private)
Load Balancer Drupal Droplet Master Mysql Droplet
Drupal Droplet Clone

##My thoughts here:

  • lysncd to keep D7 application files matching
  • DO load balancer
  • Switching to NGINX for web service
  • Sticky sessions: on
  • HTTP/2 SSL Termination
  • My bottle neck could still be the mysql server but I don’t think I’m ready for make a data cluster

##Quick Questions:

  • Is it worth using GlusterFS instead of lsyncd? Best way to keep files synced if I need to add more application nodes?
  • I may just run one application node, and boot up the second from a snapshot during peak volume times, thoughts on this approach?

##Looking for guidance here:

  • The node attachments (99.9%) images can take up a lot of space, I’m thinking use S3 to host these files (the domain name isn’t that important for these). This would allow me to not worry about replicating files on both application nodes or worry about running out of storage on a small sized node. Any thoughts on this approach? I would have considered DO’s block storage, but it looks like it can only connect to one node at a time. How about a specific application node dedicated to file storage instead of S3?

Submit an answer


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!

Sign In or Sign Up to Answer

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.

Ryan Quinn
DigitalOcean Employee
DigitalOcean Employee badge
May 18, 2018
Accepted Answer

Is it worth using GlusterFS instead of lsyncd? Best way to keep files synced if I need to add more application nodes?

With just two nodes lsyncd might be a better option as it would provide quicker access to files since everything will be stored locally. GlusterFS may make things easier once you have 3 or more nodes and would also allow you to make more efficient use of your available space across nodes.

I may just run one application node, and boot up the second from a snapshot during peak volume times, thoughts on this approach?

This approach would work but you would need to configure a method to increase space that will both spin up the new node from a snapshot and update nginx so that traffic is routed to it (or if using the DO load balancer service you could do this via the API).

The node attachments (99.9%) images can take up a lot of space, I’m thinking use S3 to host these files (the domain name isn’t that important for these). This would allow me to not worry about replicating files on both application nodes or worry about running out of storage on a small sized node. Any thoughts on this approach? I would have considered DO’s block storage, but it looks like it can only connect to one node at a time. How about a specific application node dedicated to file storage instead of S3?

Using object storage like S3 or DigitalOcean Spaces would be a viable solution here that should reduce the requirements on your nodes and would not need to set up some type of live redundancy of your files since you would reference the object storage directly.

Thanks, ended up using added a DO volume to the DB server and used NFS mount for the static files on each WEB server…thinking this is the simplest solutions…still testing performance.

Lsyncd works great and is allowing multiple nodes with a quick setup.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel