What is multi-tenant architecture? Single vs multi-tenant
Pool, schema-per-tenant or database-per-tenant? How each tenancy model trades isolation for cost, where shared-schema designs leak data, and why most SaaS teams start pooled and move only their largest or most regulated customers to a silo.
On this page
Multi-tenant architecture is a software design in which one application instance serves many customers, called tenants, from shared infrastructure, while each tenant's data and configuration stay walled off from the others. It's the most common architecture for SaaS products, and it's the pattern behind most SaaS development work.
The appeal is operational. You run and update one system instead of hundreds, so a fix ships to everyone at once and the infrastructure bill grows slower than the customer list. The catch: "isolated" now depends on decisions you make, not on physically separate machines. Pick the wrong tenancy model and you either pay for isolation you don't need or sit one bad query away from showing a customer someone else's data.
Single-tenant vs multi-tenant
The easiest way to understand multi-tenancy is to contrast it with its opposite.
In a single-tenant setup, every customer gets a dedicated instance of the application and its own infrastructure, often down to a separate database. Nothing is shared. That buys maximum isolation and easy per-customer customization, but you now operate a fleet of near-identical stacks and pay for idle capacity across all of them.
Multi-tenant flips that. One running instance serves everyone, and isolation happens logically rather than physically. You maintain one thing, deploy once, and share compute and storage across the whole customer base. In exchange, the boundaries between customers live in your code and data model, so they're only as solid as you make them.
Plenty of SaaS companies start multi-tenant because sharing infrastructure is cheaper to run. Single-tenant usually shows up later and selectively, for enterprise customers who need a dedicated environment. Microsoft's multitenant governance guidance describes the same move: dedicated deployments for tenants with stricter compliance needs.
Multi-tenant database models: pool, schema, silo
Multi-tenancy isn't one design. At the data layer you'll usually pick between three models, and that pick is the central architectural decision. AWS calls the fully shared end Pool and the fully dedicated end Silo in its SaaS Lens guidance. Schema-per-tenant sits between them. (AWS's third term, Bridge, means something else: a mix where different layers use different tenancy, covered below.)
In the pool, isolation rests entirely on every query carrying the right tenant filter. Schema-per-tenant gives stronger separation and easier per-tenant backup, but catalog metadata grows with every tenant you add. A silo has the strongest isolation and the simplest restore story, and it costs the most.
Isolation and cost climb together as you move from pool toward silo. No model is cheap, simple and maximally isolated at once, so make this choice on purpose.
Data isolation and security
In a pooled model, the only thing between customer A's records and customer B's is a
WHERE tenant_id = ? clause. Forget it on one query, or write an ad hoc report that
skips it, and you have a cross-tenant data leak. That's the classic failure mode of
shared-schema multi-tenancy.
The fix is defense in depth, in line with the OWASP Multi Tenant Security Cheat Sheet. First, enforce tenant scoping in the application: propagate a validated tenant identity on every request, centralize query building so nobody writes raw queries that skip the filter, and never trust a tenant ID from user input. Then add a database backstop. PostgreSQL Row-Level Security (RLS) lets the database itself refuse rows outside the current tenant's context, so one missing filter in the app can't expose everyone.
RLS backs up correct scoping in your code; it doesn't replace it. You enable it per
table, and there's a gotcha: table owners, superusers and roles with BYPASSRLS skip
the policies unless the table also uses FORCE ROW LEVEL SECURITY. If your app
connects as the table owner, check that first. For policy examples and the full
implementation, see our guide to
multi-tenant SaaS architecture.
Scaling and noisy neighbors
Share infrastructure and you inherit the noisy neighbor problem: one tenant running a huge report or hammering the API can starve everyone else on the pool. Microsoft's Noisy Neighbor antipattern page walks through the symptoms.
None of the controls are exotic. Per-tenant rate limiting stops a single account from monopolizing the API. Resource quotas and tiered limits cap how much any one tenant can consume. Connection pooling keeps one heavy user from exhausting the shared database. Many teams also tier their customers, giving premium accounts higher ceilings and grouping tenants so a spike stays contained. And when a tenant consistently outgrows the pool, move it instead of throttling it forever. Promoting a heavy account to its own database or a dedicated tier is routine work, and it's why so many products end up mixing models.
How to choose your multi-tenant SaaS architecture
For most products, especially early ones, start pooled. A shared schema behind a clean mvp is cheaper, faster to build, and easier to change while you're still learning what customers actually need. Hold off on stronger isolation until a real requirement shows up. Move a tenant toward schema-per-tenant or database-per-tenant when something concrete pushes you there: a contract, residency rule or risk assessment that calls for data separation, a customer large enough to become a noisy neighbor, or a per-tenant restore need the pool can't meet.
In practice, mature SaaS rarely picks one model and stops. The common shape is a hybrid, sometimes called the bridge or tiered approach: the long tail shares a pool while large or regulated tenants get siloed under the same control plane. Microsoft's Deployment Stamps pattern describes the same idea. If you're also budgeting the build, our SaaS development cost breakdown shows where tenancy work lands.
What production multi-tenancy demands
Shipping a real multi-tenant system means getting a few things right beyond the data model. Onboarding and provisioning have to be automated, because creating a schema or database by hand won't survive your fiftieth customer. Migrations must run cleanly across every tenant. Per-tenant configuration becomes its own layer: billing plans, roles, feature flags, and usage limits all scoped to the tenant. Observability needs a tenant dimension too, so you can tell whether something is slow for everyone or just one account.
If you're weighing tenancy models for a new product or untangling one retrofitted under pressure, this is the work of custom software development and product development. Tenancy is far easier to change before real customer data sits in the pool than after.
Frequently asked questions
One running copy of an application serves many separate customers, called tenants, from the same infrastructure. Each sees only its own data, even though they share servers underneath. Picture an apartment building: one structure, many private units, shared plumbing.
A tenant is one customer account in a shared SaaS application, usually a company or team rather than a single user. Everything that belongs to it (users, data, settings, billing plan) is tagged with that tenant's identity and kept apart from other tenants.
Single-tenant gives each customer a dedicated application instance and its own infrastructure, so nothing is shared. Multi-tenant runs one shared instance for everyone and isolates each tenant logically. Single-tenant costs more and isolates more. Multi-tenant is cheaper to run and update, but it puts the burden of isolation on your code and database.
Shared schema pools every tenant into the same tables, separated by a tenant ID column. Schema-per-tenant gives each tenant its own schema inside one database. Database-per-tenant hands each a full, separate database. AWS calls the fully shared approach Pool and the dedicated one Silo, and both isolation and cost rise as you move from pool toward silo.
It can be, but you have to build it in. In a shared schema, one query that forgets its tenant filter can leak data across accounts. Good designs enforce tenant boundaries in the application first: a validated tenant identity on every request, centralized query building, and no trust in tenant IDs from user input. Then they add a database backstop such as Postgres row-level security.
The noisy neighbor problem is one heavy tenant degrading performance for the rest. Standard fixes are per-tenant rate limits, resource quotas, and connection pooling so no single account can hog the shared pool. When one tenant consistently outgrows the pool, you move it to a dedicated database or tier while everyone else stays shared.
Keep exploring
What is a minimum viable product (MVP)?
A minimum viable product (MVP) is the smallest product that delivers real value and tests your riskiest assumption. Here's what MVP means, the main types, how to scope and measure one, and the traps that bloat it into a slow v1.
6 min readEngineeringWhat is API integration? How it works and where it breaks
How API integration works: what it connects, the request and event styles behind it, how authentication and rate limits shape the design, and why a retry without an idempotency key is the usual point where it stops being reliable.
7 min readEngineeringWhat is alphanumeric: character sets, validation, and encoding
Alphanumeric means letters plus digits and nothing else. See the 62 ASCII characters, Unicode letter and number classes, regex patterns for JavaScript and Python, EBCDIC pitfalls, and where an alphanumeric allow-list helps security.
6 min read