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:

  1. Multiple load balancer servers for redundancy
  2. DNS configuration with multiple A records pointing to your load balancers
  3. 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:

  1. Navigate to your app’s Health Checks settings
  2. Configure the Load Balancer Health Check section:
    • Health check endpoint (e.g., /health)
    • Check interval
    • Timeout settings

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:

  1. Automated HTTPS domains
  2. DNS wildcard domains
  3. Self-signed SSL domains
  4. 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:

  1. Go to your cluster’s settings
  2. Enable “Caddy Debug Mode”
  3. Check the Caddy logs for detailed information

For more debugging information, see our Caddy debugging guide.