Skip to navigation

Load Balancers

A load balancer is a single public address that spreads incoming traffic across several of your servers. Clients connect to the load balancer, and it forwards each request or connection to one of your servers (its backends). If a backend stops answering its health check, the load balancer stops sending it traffic until it recovers.

Think of it as a receptionist: visitors always come to the same front desk, and the desk sends each one to a colleague who is free.

When to use a load balancer

You want to…UseWhy
Run the same app on two or more VMs and keep it up when one failsLoad balancer (this page)One address, traffic spread across healthy backends
Give one VM a public address that you can move to another VM laterReserved IPOne server, no health checks, no traffic splitting
Open one port on a private VM in a VPC to the internetNAT port forwardingNAT (network address translation) maps a port on the VPC’s shared public address to the VM; no load balancer needed
Serve images, CSS or downloads from storage, fast, worldwideCDNCaches files close to users; not for app servers

If you have only one server, you don’t need a load balancer yet. Point your domain at the server’s Reserved IP instead.

How it works

  1. You create the load balancer and list your backends (an IP address or hostname plus a port for each). IBEE gives it a public hostname, such as 3f9c2b7e-….lb.ibee.ai, and a listener port.
  2. Clients connect to that hostname and port. You can point your own domain at it with a DNS record.
  3. The load balancer checks each backend on a schedule (a health check) and picks a healthy one for each request or connection, using the routing algorithm and backend weights.
  4. The backend answers through the load balancer. Your backend sees the connection coming from the load balancer, not from the client.

Layers and protocols

A load balancer works at one of two layers. Layer 7 (L7) understands web requests (HTTP), so it can route by URL path or header. Layer 4 (L4) only sees network connections (TCP) and forwards them without reading them. You choose the layer and protocol when you create the load balancer, and you can’t change them later.

LayerProtocolClients connect toEncryption (TLS)Use for
L7HTTPS (portal default)Port 443Ends at the load balancer, with a certificate IBEE managesWebsites and APIs
L7HTTPPort 80NoneTesting, or traffic that is encrypted elsewhere
L4TCP (L4 default)A port IBEE assigns from 9000–19999None addedDatabases, queues, game servers, any TCP service
L4TLS passthroughPort 8443Passed through unopened; your backend holds the certificateEnd-to-end encryption

TLS (Transport Layer Security) is the encryption behind https://. See SSL and TLS termination for how each mode handles certificates.

You don’t pick a location for a load balancer. It runs on IBEE’s shared load-balancing service and reaches your backends at the addresses you give it.

What a load balancer can do

FeatureWhere you set itDetails
Backends with weightsPortal and API1 or more backends, each with a port and a weight from 1 to 1000
Routing algorithmPortal and APIRound robin, least request, random or consistent hash. See Algorithms.
Active health checksPortal and APIHTTP, HTTPS or TCP probes. See Health checks.
Passive health checksAPI onlyTakes a backend out after repeated 5xx errors
Request timeout and retriesPortal and APIFor HTTP and HTTPS load balancers
Path and header rulesPortal and API, L7 onlySend /api to one set of backends and everything else to another
Your own domain with automatic certificateAPI only, L7 HTTPS onlySee Use your own domain
Change settings after creationAPI onlyThe portal can’t edit a load balancer; delete and recreate it, or use PATCH

Three options on the create form are saved with the load balancer but not applied to traffic yet: Sticky sessions, Proxy protocol, and Encrypt traffic from the load balancer to this backend. Don’t rely on them. Traffic from the load balancer to your backends is unencrypted, and your backends don’t receive the client’s address through proxy protocol.

Before you begin

  • A verified organization. Until identity verification is complete, the portal shows Verify Identity instead of Create Load Balancer. See Verify your identity.
  • At least one backend that the load balancer can reach. For a VM, that is its public IPv4 address. The load balancer is not inside your VPCs, so it can’t reach VPC-only private addresses. See Attach VMs.
  • A firewall rule that lets traffic reach the backend port, for both requests and health checks. See Create firewall rules.
  • For the API: an API token with Load Balancer permission (load-balancer.read to view, load-balancer.write to create, change or delete) and your workspace ID.

To create one now, follow Create a load balancer.

Limits

ItemLimit
Load balancers per organizationSet by your plan. See Limits and quotas.
Name1–128 characters, unique in the workspace
BackendsAt least 1; port 1–65535; weight 1–1000 (default 100)
Request timeout100–300,000 ms (default 30,000 ms, which is 30 seconds)
Health-check interval and timeout100–120,000 ms each (defaults 10,000 ms and 2,000 ms)
Health-check thresholds1–20 (defaults: 2 passes to recover, 3 failures to remove)
Retries1–10 attempts (default 3), 100–120,000 ms per attempt (default 5,000 ms)
Custom domains1 per L7 HTTPS load balancer, API only
IP versionsClients connect over IPv4. Backend addresses can be IPv4 or IPv6.

Billing

Billing starts when the load balancer becomes active and stops when you delete it. IBEE’s price list for load balancers has these items:

  • each hour the load balancer is active;
  • HTTP requests (L7);
  • data processed, in and out;
  • new connections and connection time (L4).

The charges appear under Network & Security → Load Balancer in your billing summary. Backends are billed separately as the VMs they are; deleting a load balancer doesn’t delete them.

Troubleshooting

You seeWhat it meansWhat to do
Verify Identity instead of Create Load BalancerYour organization isn’t verified yetComplete identity verification.
”You have reached your plan’s limit for this resource.”Your plan’s load balancer limit is used upDelete a load balancer you don’t need, or click Request a limit increase.
An L7 endpoint returns 503, or an L4 connection closes straight awayNo backend is healthy, so there is nowhere to send trafficSee Health checks → Troubleshooting.
Your app logs show the load balancer’s address instead of the visitor’sThe load balancer opens its own connection to each backendExpected. Proxy protocol, which would pass the client address, isn’t applied yet.
You need to change backends, rules or health checksThe portal has no edit optionUse the API’s PATCH operation, or delete the load balancer and create a new one.