A Multi-Instance deployment with multiple Somewear Core nodes needs a load balancer in front of it. This page installs one on a dedicated Ubuntu or Debian VM running Caddy, configured through the Pilot CLI.
A cloud-native load balancer is usually the simpler choice, but not every provider supports it here: Azure’s Application Gateway can’t be used, because it doesn’t support HTTP/2 all the way to the backend servers. A Caddy VM is the workaround.
What you’ll need
- One or more servers running Ubuntu or Debian Linux, each with:
- 2 CPU cores
- 4 GB RAM
- 40 GB disk storage
- The Somewear Labs Pilot CLI tool (installed by the script below)
- A completed Multi-Instance install — the Core nodes this load balancer will sit in front of
Install Caddy and the Pilot CLI
Run the installation script. It installs Caddy, sets up the Pilot CLI tool, creates the pilot user that runs it, and initializes the configuration directories.
curl -sSL https://get.somewear.app/core/install_caddy.sh | bashInitialize the Pilot configuration
Switch to the pilot user and initialize its configuration file.
sudo su - pilotpilot load-balancer initGenerate the Caddy configuration
Use Pilot to create Caddy’s configuration file.
pilot load-balancer configRestart Caddy
Log out of the pilot user account and restart the Caddy service as a privileged user with sudo access.
sudo systemctl restart caddy.service