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:
-
The
LoadBalanceritself defines the services which are to be presented publicly- It consumes a
PublicIPdefining 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
- It consumes a
-
An
L4Routedefines how traffic received by a listener is routed to the backend services- It references a
BackendServiceto which it will forward traffic- The current L4 load balancer has a trivial 1-1 routing capability. Future revisions will extend this
- It references a
-
A
BackendServicedefines 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
BackendPoolof VMs which implement this internal service - An optional health check
-
A
BackendPoolidentifies the set of evroc VMs that host a givenBackendService
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:
-
LoadBalancer: acme-web-service
- Listeners:
- TCP/80 → acme-http-route
- TCP/443 → acme-https-route
- Listeners:
-
L4Routes:
- acme-http-route → acme-http-backend
- acme-https-route → acme-https-backend
-
BackendServices:
- acme-http-backend: port 8080 → acme-web-service-pool
- acme-https-backend: port 8443, proxy-protocol → acme-web-service-pool
-
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