Skip to content

Functional description

The evroc load balancer service distributes TCP, HTTP, and HTTPS traffic from the public internet across pools of evroc virtual machines. HTTPS listeners terminate TLS at the load balancer.

Load balancer configuration is split into four tiers:

  1. The LoadBalancer itself defines the services which are to be presented publicly

    • It consumes a PublicIP defining the stable address to use
    • It defines a set of listeners, each containing a protocol-port pair to be exposed by the load balancer (e.g. TCP/443)
      • Each TCP listener supports at most one L4Route reference
      • Each HTTP or HTTPS listener supports up to 32 HTTPRoute references, for separate hostnames or sets of rules
      • HTTPS listeners also reference a LoadBalancerCertificate for TLS termination
  2. Routes define how traffic received by a listener reaches backend services

    • An L4Route forwards TCP traffic to one BackendService
    • An HTTPRoute routes HTTP requests by hostname and named rules. Each rule forwards to one BackendService
      • A request matches a rule if it satisfies any of the rule’s match entries
      • Within an entry, the request must satisfy all specified path, method, header, and query conditions
      • A rule with no matches is a catch-all
  3. A BackendService defines an internal service which will handle traffic routed from a listener. It defines:

    • The port on which the backend service should handle this traffic
    • Whether the backend service understands and needs proxy protocol support
      • Proxy protocol wraps traffic to the backend with client metadata (client IP and port)
    • A reference to the BackendPool of VMs which implement this internal service
    • An optional health check
  4. A BackendPool identifies the set of evroc VMs that host a given BackendService

All these objects are regional, rather than zonal (i.e. they are created once-per-region, not once-per-zone). Individual L4Route, HTTPRoute, LoadBalancerCertificate, BackendService, and BackendPool resources can be reused by multiple load balancers.

Use an HTTPS listener to terminate TLS at the load balancer, then route requests through an HTTPRoute to your application’s HTTP port. The listener references a LoadBalancerCertificate containing your certificate and private key.

For example, the HTTPS setup guide connects these resources:

HTTPS/443 listener (web-cert)
├─ HTTPRoute (web-route, web.example.com) → BackendService (web-backend, port 8080) → BackendPool (web-pool)
└─ HTTPRoute (api-route, api.example.com) → BackendService (api-backend, port 8080) → BackendPool (api-pool)

Use a TCP listener on port 443 to pass encrypted traffic through to a backend that terminates TLS. The load balancer forwards these connections through an L4Route and doesn’t use a certificate resource or HTTP routing rules.

To serve HTTP on port 80 and pass HTTPS through to the application’s TLS port 8443, define the following resources:

  1. LoadBalancer: acme-web-service

    • Listeners:
      • TCP/80 → acme-http-route
      • TCP/443 → acme-https-route
  2. L4Routes:

    • acme-http-route → acme-http-backend
    • acme-https-route → acme-https-backend
  3. BackendServices:

    • acme-http-backend: port 8080 → acme-web-service-pool
    • acme-https-backend: port 8443, proxy-protocol → acme-web-service-pool
  4. BackendPool: acme-web-service-pool

    • VMs: vm1, vm2

A LoadBalancerCertificate stores the certificate chain and private key for HTTPS listeners. The service validates the content and reports readiness, expiry, certificate identity, and SHA256 fingerprints through resource status.

For renewal with the same key, upload only the certificate chain. To replace the key, upload both the certificate and key. Listener references stay the same when you replace content on the existing certificate resource. Certificate issuance and renewal scheduling are your responsibility.

For setup and renewal instructions, see Create an HTTPS load balancer and Manage load balancer certificates.

Backend pools can contain virtual machines in one zone or across multiple zones. evroc operates the load balancer service and manages traffic distribution across the configured backends.

Each backend service can optionally have a single health check. There are two types of health checks:

  • TCP
  • HTTP

See the API docs for the parameters for these health checks.

evroc load balancers have the following constraints:

  • There is no auto-scaling of backend pools; VMs must be added or removed by the user as needed
  • Listeners support TCP, HTTP, and HTTPS; the TLS protocol value is reserved and is not supported
  • Each TCP listener accepts at most one L4 route reference; HTTP and HTTPS listeners accept up to 32 HTTP route references
  • Listener ports must be unique within a load balancer
  • Each organization has a quota of 10 load balancers
  • There is an upper limit of 32 listeners per load balancer