Platform

Load Balancers

Run an HAProxy load balancer on one of your servers, with listeners, backend pools, health checks, routing rules and TLS.

What it is

A load balancer is an HAProxy instance that CloudOps installs on one of your bare-metal servers. You describe it in the console: the ports it listens on, the pools of targets it sends traffic to, and the rules that choose a pool. CloudOps writes the HAProxy configuration and applies it on the server.

Each load balancer runs on one server. There is no standby pair yet, so if that server stops, the load balancer stops with it.

How a request reaches a target
  1. ClientConnects to a listenerAn address and port of the load balancer
  2. Your serverListenerTCP, HTTP or HTTPS
  3. Your serverBackend poolAlgorithm and health check
  4. Your targetsServer or IP and port
A listener accepts the connection, a routing rule or the listener's default pool picks a backend pool, and the pool spreads the traffic over its targets.

Before you start

  • A bare-metal server that CloudOps manages, in the region selected at the top of the console. HAProxy is installed on that server.
  • The right address on that server. An External load balancer listens on the server's public IP. An Internal one listens on its Nebula mesh IP, so only machines on your mesh can reach it. The server needs the address for the type you choose.
  • The Member role or above. Viewers can see load balancers but cannot change them.
  • A certificate, for HTTPS. To use a managed certificate, create it first under Security → SSL Certificates. Only active certificates are offered.

1. Basic Info

Open Networking → Load Balancers and press Create Load Balancer. The wizard has four steps: Basic Info, Backend Pools, Listeners and Review.

  • Name: letters, digits, hyphens and underscores. No two load balancers can share a name.
  • Description (optional).
  • Server: the bare-metal server HAProxy is installed on.
  • Type: External or Internal, as described above.

2. Backend Pools

A backend pool is a group of targets that share a balancing algorithm and a health check. The wizard starts with one pool named default. Press Add Backend Pool for more. Pool names use letters, digits, hyphens and underscores, and each name is used once per load balancer.

  • Algorithm: Round Robin, Least Connections or Source IP Hash.
  • Health Check: on by default, as a TCP connect every 10 seconds. A target is taken out of rotation after 3 failed checks and put back after 3 good ones. An HTTP check sends GET to the Path you enter and expects status 200. It applies only to a pool that serves an HTTP or HTTPS listener; a pool behind a TCP listener is checked with TCP. The interval can be 2 to 300 seconds.
  • Sticky Sessions: keep a client on the same target. With Cookie, HAProxy sets a cookie (SRVID unless you enter another Cookie Name). With Source IP, a client address stays on its target until it has been idle for 30 minutes.
  • Targets: press Add Target, then pick one of your servers or Custom IP... and type an address. Set the Port and a Weight from 0 to 256 (default 100). Picking a server fills in its public IP for an External load balancer, or its mesh IP for an Internal one.

3. Listeners

A listener is a port the load balancer accepts traffic on. The wizard starts with one listener named http on port 80. Press Add Listener for more.

  • Name, Port, Protocol (HTTP, HTTPS or TCP) and Default Pool. Listeners on one load balancer need different names and ports.
  • Max Connections: a cap on open connections for the listener. Leave it empty for no cap.
  • Rate Limit (req/s) and Rate Limit Burst, for HTTP and HTTPS listeners. A client address that sends more requests in one second than the burst value, or than the limit if you leave the burst empty, gets HTTP 429.
  • TLS Certificate, for HTTPS: Use managed certificate and pick one, or Paste PEM directly and fill in Certificate (PEM) and Private Key (PEM). TLS ends at the load balancer, which connects to the targets without TLS. To pass TLS through to the targets unchanged, use a TCP listener instead.

When a managed certificate renews, CloudOps applies the new one to every load balancer that uses it.

4. Review

Check the summary and press Create Load Balancer. The status shows Provisioning while HAProxy is installed, then Active. If the install fails, the status is Error, the load balancer's page shows the last lines of the job output, and you get a critical notification.

Ports

  • CloudOps refuses a port that another load balancer on the same server already uses, or that the server's last discovery scan saw another program listening on. If that program has gone, run discovery on the server again.
  • If a firewall rule on the server redirects the port to something else, as a Kubernetes ingress on port 80 or 443 does, the install stops before it changes anything and names the rule.
  • Port 8404 on the same address is the load balancer's statistics endpoint, which the platform reads for monitoring. It is password-protected, and the password is not shown in the console. No listener can use that port.
  • CloudOps does not open listener ports in the server's firewall. If the server has security groups or host firewall policies, allow the listener ports there.

Change a load balancer

Click a load balancer in the list to open it. The page has four tabs: Overview, Listeners, Backend Pools and Monitoring.

  • On Listeners, press Add Listener, or use a listener's Rule button to add a routing rule and its bin icon to remove it.
  • On Backend Pools, press Add Pool, or use a pool's Target button to add a target. Each target has Disable and Enable: a disabled target stays in the list but gets no traffic. A pool that a listener or a rule still uses cannot be removed.

The console adds and removes listeners, pools, targets and rules, but does not edit them. To change one, remove it and add it again. Sticky sessions can only be set in the create wizard; a pool added later has them off.

Each edit is saved at once but reaches the server only when you apply it. While a load balancer has saved changes that its server is not running yet, its page shows a warning with an Apply Changes button, and the list marks it Unapplied changes. Both stay until the changes are applied, so you can leave the page and apply later. While the new configuration is applied, the status shows updating, and the warning goes once the server has taken it.

If an apply fails, the status is Error and the warning stays, so you can fix the cause and press Apply Changes again. A load balancer in Error with nothing waiting offers Apply Again, which pushes the saved configuration once more. If the first setup failed before HAProxy was installed, for example because a port was taken, fix the cause and press it: it finishes the install too.

If CloudOps cannot build a working configuration, for example because an HTTPS listener's certificate was deleted, the apply is refused and the server keeps the configuration it already runs. A certificate renewal or a Let's Encrypt check that updates the load balancer leaves such a listener out instead, so its port stops answering, and the load balancer shows unapplied changes until you attach a certificate and apply. The warning names each listener that has no certificate.

Routing rules

A routing rule sends matching requests to a pool other than the listener's default. Rules read HTTP requests, so use them on HTTP and HTTPS listeners. You add them after the load balancer exists, with the listener's Rule button:

  • Name and Priority. Rules are checked from the lowest priority number up, and the first match wins. The default is 100.
  • Condition Type and Condition Value: Path Prefix (such as /api), Path Exact, Host Header (such as api.example.com, case-insensitive) or Custom Header, written as Header-Name: value.
  • Target Pool.

A request that matches no rule goes to the default pool.

Monitoring

An Active load balancer reports metrics to your monitoring. The Monitoring tab links to them with Open Metrics and to your alerts with View Alerts.

Delete a load balancer

Press Delete on the load balancer's page. This stops HAProxy for that load balancer and removes its configuration from the server. If it is the last load balancer on the server, you can also tick Also uninstall HAProxy from the server to remove the package and its leftover files. That option removes HAProxy only if CloudOps installed it; an HAProxy that was there before is left alone. The bin icon in the list deletes without offering that option.

A server that runs a load balancer cannot be deleted. Delete the load balancer first.

Imported load balancers

A load balancer marked Imported · read-only describes an HAProxy that was already running on one of your servers. CloudOps shows its listeners and pools but does not manage it: Apply Changes, Delete and every listener, pool and target change are turned off, and the page lists what the import could not capture. Importing a load balancer, and removing an imported one, are not available in the console yet.

Limits

  • One server per load balancer, with no standby pair.
  • No TLS between the load balancer and the targets on HTTPS listeners.
  • HTTP/3 is not supported.
  • Listeners, pools, targets and rules cannot be edited in place, and sticky sessions are set only when the load balancer is created.