Functional description

The evroc load balancer service is an L4 load balancer that allows you to load-balance incoming TCP traffic from the public internet across one or more user-defined pools of evroc virtual machines.

Model

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 of these should reference an L4Route to define how to handle their traffic
  2. An L4Route defines how traffic received by a listener is routed to the backend services

    • It references a BackendService to which it will forward traffic
      • The current L4 load balancer has a trivial 1-1 routing capability. Future revisions will extend this
  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, BackendService and BackendPool resources can be reused by multiple load balancers.

Worked example

To host a web service which has both HTTP and HTTPS services, 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

Load-balancing behaviour

evroc load balancers use consistent hashing, so that connections are distributed stably across the available backends while avoiding unnecessary traffic redistribution. Within a single backend pool, the virtual machines can be in the same zone or spread across zones.

The load balancers are designed to tolerate zonal failures by steering traffic to backends in other zones. The load balancers use passive health checking to avoid sending traffic to backends which are not available.

Health checks

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.

Constraints

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
  • Only TCP traffic is supported
  • There is an upper limit of 64 listeners per load balancer