Load Balancers

Distribute traffic across multiple instances with automatic health-based failover.

Create via API

POST /v1/load-balancers
{
  "name": "web-lb",
  "region": "vh-us-south-1",
  "forwarding_rules": [
    { "entry_port": 80, "entry_protocol": "http",
      "target_port": 3000, "target_protocol": "http" },
    { "entry_port": 443, "entry_protocol": "https",
      "target_port": 3000, "target_protocol": "http" }
  ],
  "health_check": {
    "protocol": "http", "port": 3000, "path": "/health",
    "interval": 10, "timeout": 5, "threshold": 3
  },
  "backend_instances": ["inst_abc123", "inst_def456"]
}

Algorithms

AlgorithmUse case
round_robin (default)Stateless services
least_connectionsMixed request durations
ip_hashSession sticky by client IP

SSL Termination

Upload a cert, then reference it in a forwarding rule:

POST /v1/certificates
{ "name": "my-cert", "private_key": "...", "certificate": "...", "certificate_chain": "..." }

# In forwarding rule:
{ "entry_port": 443, "entry_protocol": "https",
  "target_port": 3000, "target_protocol": "http",
  "certificate_id": "cert_xyz" }

Pricing

Load balancers are included free. You pay only for outbound bandwidth (5 TB/mo free).

Related