Multi-Tenant API
A multi-tenant API serves many customers, called tenants, from a shared infrastructure while keeping each tenant data, configuration, and credentials isolated. Requests are identified by tenant using tokens, subdomains, or headers, and policies are applied per tenant.
Technical Architecture & Deep-Dive
SaaS platforms run one codebase for thousands of customers. The API must route every request to the correct tenant context, enforce that tenant usage limits, and never leak data across boundaries.
Edge gateways help by resolving tenant identity from custom domains or client tokens before requests reach origins, applying per-tenant rate limits and injecting tenant-specific secrets from an encrypted vault.
Key Architectural Benefits
Implement Multi-Tenant API at the Edge
Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.
Frequently Asked Questions
Q:How do APIs identify the tenant for a request?
Common methods include tenant-scoped API tokens, subdomains or custom domains, and explicit tenant headers validated against the authenticated identity.
Related Architecture Concepts
Custom Domain Edge Routing allows developers to map their own branded domain (e.g., api.yourdomain.com) to edge infrastructure via CNAME and automated TLS issuance. This creates white-labeled API endpoints, prevents third-party ad-blocker filtering, and enhances brand authority.
A Client Token is a scoped, revocable authentication credential designed for frontend web and mobile applications. It grants permission to invoke specific edge API pipelines while enforcing allowed-origin domains and rate limits, safely abstracting sensitive upstream API secrets.
API Rate Limiting is a traffic control mechanism that caps the number of requests a client, IP address, or API token can execute within a specified time window. Rate limiting prevents server overloading, protects against credential brute-forcing, and shields upstream APIs from exceeding subscription quotas.