Skip to navigation

A load balancer routes to backends — each one a service, ip, or hostname target. To balance traffic across your virtual machines, add each VM as a backend using its IP address.

Before you begin

  • Two or more running VMs in the same workspace serving the same application (Create a VM)
  • The application listening on the same port on every VM
  • A health endpoint on each VM (e.g. /health) so failed instances are removed automatically

Add VMs as backends

1

Collect the VM addresses

Open each VM’s detail page and note its IP address. Prefer private IPs when the VMs and load balancer share a network — traffic stays internal.

2

Add a backend row per VM

In the load balancer create form, add one row per VM:

FieldValue
TypeIP address — or Hostname if you address VMs by DNS name
TargetThe VM’s IP address, e.g. 10.8.0.12
PortThe port your application listens on
Weight100 for an equal split — adjust to shift traffic
Encrypt traffic from the load balancer to this backendTick only if the VM serves TLS on that port
3

Verify distribution

After creation, open the detail page — the Backends section lists every VM with its type, target, port, weight, and TLS setting. Send a few requests to the public endpoint and confirm they spread across VMs (watch your application logs, or include the hostname in a test response).

Scaling the pool

Unhealthy VMs are removed from rotation automatically by health checks — you don’t need to remove a VM that’s temporarily down, and a VM you stop for maintenance drops out once it fails its checks.

The backend list cannot be edited after creation. To add or remove VMs permanently, or to change weights, delete the load balancer and create a new one with the updated backends, then point your clients or DNS at the new endpoint.