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:
-
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 TCP listener supports at most one
L4Routereference - Each HTTP or HTTPS listener supports up to 32
HTTPRoutereferences, for separate hostnames or sets of rules - HTTPS listeners also reference a
LoadBalancerCertificatefor TLS termination
- Each TCP listener supports at most one
- It consumes a
-
Routes define how traffic received by a listener reaches backend services
- An
L4Routeforwards TCP traffic to oneBackendService - An
HTTPRouteroutes HTTP requests by hostname and named rules. Each rule forwards to oneBackendService- 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
- An
-
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, HTTPRoute, LoadBalancerCertificate, BackendService, and BackendPool resources can be reused by multiple load balancers.
Choose where to terminate TLS
Section titled “Choose where to terminate TLS”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.
TCP passthrough example
Section titled “TCP passthrough example”To serve HTTP on port 80 and pass HTTPS through to the application’s TLS port 8443, 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
HTTPS and certificates
Section titled “HTTPS and certificates”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.
Load-balancing behaviour
Section titled “Load-balancing behaviour”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.
Health checks
Section titled “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
Section titled “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
- 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