Managed Load Balancers
Blossom uses Caddy as its load balancer to distribute traffic across your application servers and manage SSL certificates. Load balancers provide high availability.
Overview
Load balancers in Blossom:
- Distribute incoming traffic across multiple web servers
- Handle TLS termination and manage SSL certificates
- Support custom domains
- Provide health checks for high availability
Server Roles
When creating servers in your cluster, you can assign them different roles:
- load balancer: The load balancer role tag tells Blossom to run the server as part of the cluster’s load balancer. You can run the load balancer on separate servers or run it on the same server as your web servers, depending on whether you want high availability or cost savings.
High Availability Setup
For production environments, you can run:
- Multiple load balancer servers for redundancy
- DNS configuration with multiple A records pointing to your load balancers
- Health checks enabled to ensure traffic is only routed to healthy instances
Example DNS configuration with multiple load balancers:
example.com. IN A 203.0.113.1 # Load Balancer 1
example.com. IN A 203.0.113.2 # Load Balancer 2
You can also use a single load balancer and multiple web servers for scaling load, depending on your needs.
Load Balancer Features
Health Checks
Load balancers can monitor the health of your application servers. To configure health checks:
- Navigate to your app’s Health Checks settings
- Configure the Load Balancer Health Check section:
- Health check endpoint (e.g.,
/health
) - Check interval
- Timeout settings
- Health check endpoint (e.g.,
We recommend enabling health checks only after you have successfully deployed and confirmed that your app is stable.
Custom Domain Support
Load balancers support various domain configurations:
- Automated HTTPS domains
- DNS wildcard domains
- Self-signed SSL domains
- HTTP-only domains
For detailed domain configuration, see our Custom Domains guide. The simplest configuration is to use plain HTTP for the target servers, which is secure because you must explicitly allow the Custom Domain.
Debug Mode
If you need to troubleshoot load balancer issues:
- Go to your cluster’s settings
- Enable “Caddy Debug Mode”
- Check the Caddy logs for detailed information
For more debugging information, see our Caddy debugging guide.