Caddy load balancer install
Overview
The distributed system installs with multiple Somewear Core application nodes will need a load balancer to distribute traffic. Cloud-native load balancers are often the best choice, but these cannot always be used in every situation. When it comes to Azure, their Application Gateway cannot be used since it does not support HTTP/2 all the way to the backend servers. In this case, we can use a virtual machine running Caddy to serve as our load balancer.
Interested in an on-premises deployment? Reach out to [email protected] for more info.
Requirements
1 or more servers running Ubuntu or Debian Linux
2 CPU cores
4 GB RAM
40 GB disk storage
Somewear Labs Pilot CLI tool
Installation Steps
Run the installation script. This will install Caddy, setup the Pilot CLI tool and the pilot user which will be used to run the tool. The script will also initialize the necessary configuration directories.
curl -sSL https://get.somewear.app/install_caddy.sh | bash
Switch to the pilot user and initialize the Pilot configuration file.
sudo su - pilot
pilot load-balancer init
Next, use Pilot to create the Caddy's configuration file.
pilot load-balancer config
Finally, log out of the pilot user account and restart the Caddy service using a privileged user with sudo access.
sudo systemctl restart caddy.service
Last updated