Multi-Tenant SaaS Platform
Isolate every tenant's data and traffic while sharing the platform.
AdvancedPlatformSecurity
A single application serves many tenants, with tenant identity and authorization enforced at the edge and request routing or data partitioning selected per tenant so no tenant can access another's resources.
When to use it
- The product serves many customers from one codebase, but each tenant's data and access must stay isolated
- You need a strong security boundary without a separate deployment per tenant
Trade-offs
- Isolation strategy (shared DB vs partitioned DB vs separate schemas) changes cost and operational complexity dramatically
- A tenant-specific bug or noisy neighbour can still affect the shared platform if resources are not well isolated
Components used
Web AppAPI GatewayAuthorization ServiceRelational DatabaseCache
How it works
- Every request carries a resolved tenant context, and every query is scoped by tenant id — enforced at a shared layer, never left to individual queries.
- Isolation is a spectrum: shared tables with a tenant column, schema per tenant, or database per tenant, trading cost efficiency against blast radius and compliance.
- Per-tenant quotas prevent one customer's usage from degrading everyone else's experience.
Used in the wild
- B2B applications serving many customer organisations from one deployment.
- Platforms with enterprise tiers that contractually require stronger data isolation.
- Any product where per-tenant usage-based billing is needed.
Good to know
- A single missing tenant filter is a catastrophic cross-tenant data leak. This is why row-level security or a mandatory query wrapper is strongly preferred over developer discipline.
- Most mature platforms end up hybrid: pooled infrastructure for small tenants and dedicated instances for the largest, because the biggest customers demand isolation and can pay for it.
Related system design
URL Shortener
Create short aliases, then redirect quickly from a cache-backed read path.
Pastebin / Snippet Hosting
Store snippets as text or markdown, retrieve them by id, and optionally render preview.
Web Crawler / Search Indexer
Discover pages, crawl them, extract content, and index for search.
Distributed Rate Limiter
Count and throttle requests globally across many gateway instances.