Skip to main content

Multi-Tenant Architecture

Tenant Isolation Model

xScaler's multi-tenancy is built on a single architectural principle: every storage write and read is namespaced by the X-Scope-OrgID header.

Isolation Guarantees

LayerIsolation Mechanism
EnvoyLua filter rejects multi-tenant header injection
proxy-authOverwrites any client-supplied X-Scope-OrgID
xMetricsmultitenancy_enabled: true — all queries scoped to org ID
xLogsauth_enabled: true — rejects requests without org ID header
xTracesmultitenancy_enabled: true — trace storage namespaced
S3Data stored under s3://bucket/tenant_id/ prefix paths

Tenant Identifier Format

xs_payment_ab3cd4ef
│ │ │
│ │ └── 8-char lower-case base32 (random, collision-resistant)
│ └── Organisation slug (derived from display_name)
└── xScaler namespace prefix

Organisation ID format:

xs_org_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
│ │
│ └── 32-char lower hex (UUID-like)
└── xScaler org namespace prefix

Multi-Tenant Storage Paths

xMetrics (S3)

s3://xscaler-mimir-euw1-01/
├── xs_payment_abc12345/
│ ├── 01J1234567890/ # TSDB block
│ │ ├── chunks/
│ │ ├── index
│ │ └── meta.json
│ └── 01J2345678901/
└── xs_acme_def67890/
└── 01J3456789012/

xLogs (S3)

s3://xscaler-loki-euw1-01/
├── xs_payment_abc12345/
│ ├── index/
│ │ └── TSDB v13 index files
│ └── chunks/
│ └── compressed log chunks
└── xs_acme_def67890/

xTraces (S3)

s3://xscaler-tempo-euw1-01/
├── xs_payment_abc12345/
│ └── blocks/
│ ├── {block-id}/
│ │ ├── data/
│ │ └── meta.json
└── xs_acme_def67890/

Rate Limiting Per Tenant

proxy-auth enforces per-org limits set in the plans table:

PlanMax Active SeriesMax Logs Bytes/secNotes
Free20,00010 MB/sShared platform quota
Scale20,000 + metered20 MB/sMetered above included
EnterpriseCustomCustomNegotiated

When a tenant exceeds their limit:

  • proxy-auth returns 429 Too Many Requests to the collector
  • The collector's retry queue holds the data
  • The limit appears in xscalor_ext_authz_requests_total{status="DENIED"} metric

← Previous: Telemetry Flow
Next: Configuration Management →