datumctl alb plugin, run datumctl plugin install alb.
Create a load balancer
To create a load balancer in front of an origin, run the following command:ALB_NAME: a name for the load balancer, such asmy-app.ORIGIN_URL: thehttporhttpsURL of your origin, such ashttps://origin.example.com.
CNAME record. Pass --no-wait to return as soon as the load balancer exists.
A load balancer created with datumctl alb create starts with the following defaults:
- Force HTTPS: on. HTTP requests are redirected to HTTPS. To turn it off, pass
--no-force-https. - Traffic protection:
Enforceat sensitivity 1. To change it, pass--waf-mode Observeor--paranoia LEVEL, or pass--no-wafto create the load balancer without a policy. Before you put an existing site behind it, see Roll out traffic protection safely. - Load balancing: least request, with health checks off. See Load balancing and health checks.
datumctl compute deploy --http-port attaches to a workload doesn’t use these defaults. To check what a load balancer has, run datumctl alb describe ALB_NAME.
The following flags change what you create:
For example, to put a load balancer in front of a workload’s network service and attach a custom hostname, run the following command:
Inspect a load balancer
To see a load balancer’s status, hostnames, routes, traffic protection, and certificates, run the following command:Status: Active means Datum has published the configuration. It doesn’t mean a request has succeeded, so confirm with a request such as curl -I https://HOSTNAME/.
How changes roll out
You change a load balancer in one place, your project, and Datum rolls the change out to Envoy in every Datum location. There’s nothing to deploy per location and no capacity to change: Datum runs and scales the proxies. For how this works, see Envoy. A change that Datum accepts is published within seconds, but each location applies it on its own schedule. For a short time, some locations can serve the old configuration and others the new one. A change doesn’t drop connections that are already open. To confirm a change, make a request rather than reading status. If a change seems to have no effect, see A change that was accepted and never took effect.Update a load balancer
Thedatumctl alb plugin changes one part of a load balancer at a time:
- Hostnames: see Serve traffic on your own domain.
- Routes and origins: see Send paths to different origins.
- Origin weights, load balancing, and health checks: see Load balancing and health checks.
- Traffic protection: see Roll out traffic protection safely.
- Basic authentication: run
datumctl alb auth set. See Authentication.
HTTPProxy and TrafficProtectionPolicy and apply them with datumctl apply. See HTTPProxy.
Delete a load balancer
To delete a load balancer, run the following command:CNAME records that pointed at the old one. Without --yes, the command asks you to type the name to confirm.
A load balancer that datumctl compute deploy attached to a workload is deleted with the workload by datumctl compute destroy. See Compute operations.