1. Home
  2. Docs
  3. Load balancers
Guide

Load balancers

A load balancer has its own address and spreads visitors across your servers at one location. If a server stops answering, it gets no traffic until it's back. $8 a month, or by the hour.

1Add one

In the console, go to Deploy and choose Or a load balancer, or use Load balancers on the Overview. Pick the location where your servers are. It's ready in a few minutes.

2Choose what it's for

Open Settings on the load balancer:

  • Website: HTTP and HTTPS with a free certificate. Visitors on HTTP are sent to HTTPS.
  • Website, HTTP only: plain HTTP. Your servers handle HTTPS themselves, if at all.
  • Something else: one TCP port passed straight through, such as a game, a database or an API.
  • Custom: up to 10 ports of your choice.

3Pick its servers

Tick the servers it sends traffic to, up to 25, at the same location. It lets itself through their firewalls; nothing else changes on them.

4Point your domain at it

Add an A record for your domain with the load balancer's IPv4 address (and AAAA with its IPv6 address, or none). Then enter the domain under Settings. Until then, its free hostname works.

The certificate is issued once the domain points at the load balancer, and renews by itself.

5Health checks

Every few seconds it asks each server for a page (/ unless you set another under Advanced), or opens the port for TCP. A server that fails three times in a row gets no traffic until it answers twice. The page shows each server as Up or Down.

6Visitors' addresses

For web traffic, your servers see the visitor's address in the X-Forwarded-For header and the original scheme in X-Forwarded-Proto. For TCP, they see the load balancer's address.

7API and AI assistants

Everything here is also in the API (/load-balancers), the eh load-balancers command, Terraform (entityhosting_load_balancer) and the AI assistant tools.