Skip to content

CONCEPT Cited by 2 sources

Tenant header routing

Definition

Tenant header routing is the architectural pattern where a client's request carries an explicit tenant identifier in an HTTP header, and an L7 proxy uses that header alone to select the correct backend cluster — without needing to inspect the body or resolve the tenant from any other source.

Canonical articulation (Source: sources/2026-05-05-airbnb-monitoring-reliably-at-scale):

"Airbnb runs over 1,000 services, each mapped to its own tenant in a single, global user space. Our custom load-balancing tier makes this practical: we map each service name to a specific cluster backend, and every request must include a tenant header that informs routing."

Shape

┌──────────┐
│ client   │ (service X, tenant = X)
└────┬─────┘
     │   HTTP request
     │   ▪ header: X-Tenant: service-X
     │   ▪ body: telemetry payload (opaque to proxy)
┌─────────────────────┐
│ Envoy / L7 proxy    │
│ ─────────────────── │
│ header → backend    │
│   X-Tenant → VIP    │
│ mapping table       │
└────┬────────────────┘
┌─────────────────┐
│ backend cluster │
│  for tenant X   │
└─────────────────┘

Why it's a good primitive for telemetry ingestion

  • Clients don't know topology. Services emit metrics to one logical endpoint; the routing tier knows which backend cluster handles their tenant today. See concepts/vip-address-decoupling.
  • Body never needs to be parsed. The routing decision is made entirely on the header, avoiding the serialization tax of deserialising the payload.
  • Tenant topology can change without client redeploys. Moving a tenant to a new backend cluster is a config change on the proxy, not a change to every emitter.
  • Per-tenant policy enforcement. ACLs, rate limits, and per-tenant routing rules all key off the same header.

Simplification compared to content-based routing

A generic content-based router would need to:

  1. Accept the request
  2. Deserialise the payload (protobuf / JSON / OTLP)
  3. Extract the identifying field
  4. Route

Tenant header routing collapses this to a single lookup against a small in-memory map. The payload stays opaque and is forwarded byte-for-byte.

Enforcement: the header is mandatory

Airbnb's shape makes the header required, not optional: "every request must include a tenant header that informs routing." A request without the header is rejected. This shifts responsibility for tenancy identification to the emitter's instrumentation library (one place, controlled by the observability team), instead of leaving it as a proxy- side inference that can disagree with client intent.

Caveats

  • Header trust. If the header is client-set, an emitter can misroute by sending the wrong header. Airbnb's post does not discuss header signing or validation.
  • Per-service tenancy only at Airbnb's altitude. The granularity choice — one tenant per service — is service-scaled (~1,000 tenants). At very large orgs this granularity can become expensive; at very small orgs it's overkill.
  • Adding a new tenant is a config change. If the onboarding path is slow, new services can't emit until tenancy is registered.

Seen in

Last updated · 451 distilled / 1,324 read