> ## Documentation Index
> Fetch the complete documentation index at: https://www.datum.net/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Agent home for Datum, with what it is, pricing, and how to act: https://agents.datum.net
> If you can only fetch URLs: read https://www.datum.net/docs/llms.txt in full and open the most specific page for the task. Commands, limits, and field paths are on task, operations, and limits pages, not on section overviews. Pages described as "Documentation is coming soon" are placeholders.
> If you have a shell or can save files: download https://www.datum.net/docs/llms-full.txt (every page, about 740 KB) once and search it with grep, instead of fetching pages one at a time.
> datumctl describes itself: `datumctl api-resources` lists resource types and `datumctl explain <resource>` shows a schema. To act on live resources, use Datum MCP or datumctl. To search the docs, use the Docs MCP server at https://www.datum.net/docs/mcp.

# ALB

> Datum's Application Load Balancer (ALB) is built on Envoy and provides Layer 7 routing with a Coraza-based Web Application Firewall (WAF) to protect and route internet traffic to your backend services.

> [!NOTE]
>
> **Working with this resource via an AI agent?** Datum publishes three skills covering Application Load Balancer: [Application Load Balancer](https://www.datum.net/docs/agents/skills/alb.md) (creating and managing one, plus WAF and auth), [Client Traffic](https://www.datum.net/docs/agents/skills/client-traffic.md) (TLS termination, HTTP/3, connection limits; not available yet), and [HTTPRoute](https://www.datum.net/docs/agents/skills/httproute.md) (path routing, traffic splitting, redirects).

Datum's Application Load Balancer (ALB) is an edge proxy built on [Envoy](https://www.datum.net/docs/platform/envoy.md), with a [Coraza](https://www.coraza.io/)-based [web application firewall](https://www.datum.net/docs/alb/configuration/waf.md) (WAF). It started life as Datum's "AI Gateway", and it's built for AI and agent traffic as much as for websites and APIs.

Application Load Balancers help you protect and route internet traffic to your backend services. We support HTTP(S) 1.1, HTTP/2, gRPC, and WebSockets.

> [!TIP]
>
> Running NGINX, Apache, Caddy, or Traefik in front of your app? To replace that container with an ALB, see [Use ALB as your HTTP proxy](https://www.datum.net/docs/guides/alb-as-httpd.md).

![The Datum Cloud console showing an Application Load Balancer's overview, with live request rate, error rate, p95 latency, requests blocked by the firewall, and a panel for attaching custom hostnames](https://mintcdn.com/datum-4926dda5/REoQYaLkj7V4WzRK/images/alb-overview.png?fit=max\&auto=format\&n=REoQYaLkj7V4WzRK\&q=85\&s=8a7b903e39d9a02c32250e2d2e6fb727)

The overview for a load balancer: whether it is serving, live request rate, error rate, latency and blocked requests, and the hostnames it answers on

## How it works

An ALB isn't a server you size or place. You declare it once in your project, and Datum serves it from Envoy in every Datum location:

```mermaid theme={null}
flowchart LR
  C["Clients<br/>browsers · apps · AI agents"]
  subgraph loc["Nearest Datum location"]
    E["Envoy · your ALB<br/>TLS · WAF · routes · auth"]
  end
  O["Public origin<br/>an existing site or API"]
  I["Compute Instances<br/>on your gVPC network"]
  T["Connector tunnel<br/>a service on your machine"]

  C -->|"HTTPS · anycast"| E
  E -->|"HTTPS · internet"| O
  E -->|"HTTP · private network"| I
  E -->|"Iroh tunnel"| T

  classDef box fill:#E6E6E6,stroke:#8A8E99,color:#222
  class C,E,O,I,T box
  style loc fill:#EDEDEC,stroke:#8A8E99,color:#B5605E
  linkStyle 0,1,2,3 stroke:#5A5F6B,stroke-width:1.4px
```

* **Clients reach the nearest location.** Your ALB's hostnames are anycast, so each request arrives at the nearest Datum location. Envoy there terminates TLS, runs the firewall, and applies your routes.
* **Datum runs and scales the proxies.** Envoy runs as a shared fleet in every location, serving every customer's ALBs. Creating an ALB doesn't start new infrastructure, and you don't choose locations or capacity.
* **Changes reach every location.** When you change an ALB, Datum publishes the new configuration to Envoy in every location.
* **Your origin can be anywhere.** An origin can be a public site, reached over HTTPS on the internet; [Compute Instances](https://www.datum.net/docs/compute/compute-and-alb.md), reached over plain HTTP on your private [gVPC](https://www.datum.net/docs/galactic-vpc/overview.md) network; or a service on your own machine, reached through a [Connector tunnel](https://www.datum.net/docs/connectors/tunnels.md).

For Compute origins, Envoy prefers an Instance in the same location, and sends the request to the nearest location with a healthy Instance when there isn't one. For how Datum runs Envoy, including how it reaches your private network without ever reaching another customer's, see [Envoy](https://www.datum.net/docs/platform/envoy.md).

## What an ALB is made of

In Datum today, an Application Load Balancer is a product experience over several platform resources — not a single API kind. Creating an ALB in the [Cloud Portal](https://cloud.datum.net) stitches these together for you:

```text theme={null}
Application Load Balancer (product)
├── HTTPProxy (user-created) — L7 routing, origin, Force HTTPS, Host header
│     └── operator materializes Gateway (same name), canonical hostname,
│         DNSRecordSet(s), and TLS certificates (ACME)
├── TrafficProtectionPolicy (created with the proxy, same name) — Coraza/OWASP WAF
│     └── targetRefs → Gateway
└── [optional] SecurityPolicy + Secret *-basic-auth — basic authentication
```

| Piece | Role |
| - | - |
| **`HTTPProxy`** | Primary user-facing resource for hostnames, origin backends, redirects, and request filters |
| **`TrafficProtectionPolicy`** | WAF policy (Observe / Enforce / Disabled) attached 1:1 to the proxy's Gateway |
| **Gateway** (operator) | Provisioned from the HTTPProxy; WAF and auth policies target it |
| **DNS + TLS** (operator) | Canonical hostname, DNSRecordSets, and ACME certificates from proxy status |
| **SecurityPolicy** (optional) | Basic auth via [Envoy Gateway](https://gateway.envoyproxy.io/), backed by a Secret |

Portal create always POSTs an `HTTPProxy`, then attempts a matching `TrafficProtectionPolicy` (best-effort today if WAF attach fails). There's no composite ALB API yet. With `datumctl`, `datumctl alb create` creates the `HTTPProxy` and its `TrafficProtectionPolicy` for you (see [Create a load balancer](https://www.datum.net/docs/alb/operations/overview#create-a-load-balancer)), or you can apply the resources yourself.

To learn how Datum runs Envoy, see [Envoy](https://www.datum.net/docs/platform/envoy.md). See [HTTPProxy](https://www.datum.net/docs/alb/httpproxy/overview) for schemas and `datumctl` examples.

## Features

Each Application Load Balancer deploys with a default hostname and enforces HTTPS (you can disable this).

* **Protection** - The [**OWASP Coraza Web Application Firewall (WAF)**](https://www.coraza.io/) provides built-in protection with the [OWASP Core Rule Set](https://coreruleset.org/), running inside Envoy before requests reach your origin. A load balancer created with `datumctl alb create` starts in `Enforce` mode at sensitivity 1. A `TrafficProtectionPolicy` that doesn't set a mode runs in `Observe` mode. See [Roll out traffic protection safely](https://www.datum.net/docs/alb/operations/traffic-protection.md).
* **Custom Hostnames** – Verify domains (or use already verified domain resources) to use custom hostnames with an Application Load Balancer.
* **Basic Authentication** - Add a username and password to restrict access to an Application Load Balancer.
* **Load Balancing** - Split traffic across several origins by weight, choose the load balancing algorithm, and turn on passive health checks. See [Load balancing and health checks](https://www.datum.net/docs/alb/configuration/load-balancing.md).

To monitor the health of your Application Load Balancers, you can use:

* **Status** – View status “Accepted” and “Programmed”, Generated hostname(s), Custom hostname verification status, and TLS verification status.
* **Metrics** - The Datum Cloud portal provides a variety of baseline metrics, filtered by region, including: global upstream latency percentile, regional upstream RPS, and regional upstream response.
* **Activity Logs** - View and filter activity across a project, and filter by resource type (including Application Load Balancer) and action.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.