0

We are moving to a new production environment and I came up with the following setup. For the 20-25 client websites we have, I wanted to do the following:

  • DigitalOcean Load Balancer
  • Two DO Droplets where the second is actually a 'clone' of the first one
  • Managed MySQL Database
  • DigitalOcean Object Storage
  • OpenLiteSpeed Web Server
  • And this is what I think I might need: GlusterFS

Some questions:

  1. How can I make sure that both droplets has exactly the same client sites available. Is this where GlusterFS comes in, or can I approach this differently?
  2. Should there be some more LB configuration when there are multiple domains on one server, instead of just one? Or doesn't that matter?
  3. Could one managed DB, connected to both droplets, work? Or should I rethink this as well.
DennisKr
  • 11
  • 1

1 Answers1

0

While I can't tell your exact requirements, it looks like you may be over complicating things.

Firstly, how much traffic do these sites handle, do you even need such a bespoke setup? It's worth noting that WordPress really isn't designed to be load balanced. Just one example, but how would you handle sessions data.. If a user is logged in on one WP instance and is served up the other, they'd lose the authentication.

  1. You'd do this by ensuring there is some kind of deploy process to keep the code in sync, I wouldn't depend on Gluster to syncronise these changes. When you start looking at the likes of Gluster, etc, you end up in a world of server management that you may not want to venture down.

  2. A load balancer generates a particular IP address, there's no reason why the IP address can't host multiple websites.

  3. I can't see any reason why that wouldn't work.

With WP, I think your main considerations will be uploaded assets and session persistence.

Hope this helps!

Chris
  • 1,289
  • 2
  • 18
  • 34
  • Thanks. I did think about uploading assets and session persistence. For uploading assets we can use the Object Storage (Spaces, like Amazon S3) and there is a WP plugin for that to offload all media uploads to that storage. The load balancer do have sticky sessions, so this will make sure the user won't get logged out, right? – DennisKr Jul 29 '22 at 08:43
  • Sure, sticky sessions would work. The only drawback being if one node is down for whatever reason, but it wouldn't be the end of the world if they get logged out.. – Chris Jul 29 '22 at 15:20