A load balancer’s primary role is to distribute traffic between multiple nodes in order to reduce load on a system. It’s used a lot in systems that need to scale because the URL for a site can point to a single load balancer but then the backend of the site whether it be WordPress or another app, can be served from multiple servers.
In your scenario it sounds like it would be overkill. With a single WP install on a single instance a load balancer provides no extra benefit (and actually would add an additional route point and some negligible amount of load time) to the chain. Since a load balancer is typically assigned to a domain it would usually balance a single application rather than multiple (though with all technologies there are edge cases where you could likely have it server multiple different apps, just not a common scenario).
The one additional reason users might use a load balancer in our cloud environment that you touch on is to get an SSL certificate, but this is only necessary for certain types of environments. Reclaim Cloud has built in Let’s Encrypt support through an addon but the addon can only work currently with application servers like PHP, Ruby, and Node.js via the Apache, Litespeed, or Nginx web server. So if you have Apache running you can use the addon directly on that node. Some applications make use of Docker and the addon is not supported in Docker nodes, so the workaround is that it is supported on the Load Balancer so folks who run Docker containers will often add a Load balancer in order to get a free certificate to load on top of it.
I think the last might be what I was running into that prompted the question: I know what load balancers are, but I created the Wordpress installation manually using docker compose in an engine container. And while it is running Apache, when I tried to use Let’s Encrypt, I believe it wasn’t available.
The only reason I used the “manual” docker setup was to be able to specify the use of my existing MariaDB server upon setup, which I couldn’t find a way to do with the pre-built containers. It’s easy enough to set the stack up and relocate the WordPress DBs, but it seemed inelegant
Ah yeah, that makes sense then if you’re using Docker to use the LB as a way to easily add SSL on top. Back in the day I used to play a bit with an nginx proxy container that had Let’s Encrypt support built in but that was back when I was trying to use Docker all by command line. <aintnobodygottimeforthat.gif>
Gotcha. Well, the only reason I was using the command line for Docker was to specify that the installation uses my existing MariaDB server. Is there a way to install WordPress without using the command line and have it use the existing DB server?