IT Glossary
What is multi-tenant architecture, and how is tenant data kept apart?
Multi-tenant architecture: one instance of the application serves many customers, and each customer’s data stays separate from everyone else’s.
- 6
- sections
- 5
- questions answered
Multi-tenant (in Romanian, arhitectura multi-chiriaș) is the model in which a single instance of an application serves many customers, called tenants, while each tenant’s data and settings stay isolated from the others. Isolation comes in three forms: shared tables with a tenant_id column, a separate schema per tenant, or a separate database per tenant. In PostgreSQL, row-level security (since version 9.5, January 2016) lets the database itself refuse another tenant’s rows, even when an application query forgets the filter.
Think of an apartment building: one foundation, one roof, one heating system, yet every flat has its own lockable door. The model is the economic foundation of SaaS: instead of maintaining a separate copy per customer, which is expensive to run and painful to update, you maintain exactly one, and an improvement reaches everybody at once. If you are building a SaaS product, the quality of the isolation decides whether your margin grows or melts as the customer count rises. If you are merely buying SaaS, ask how your data is isolated from the other tenants: the answer says a great deal about the maturity of the provider.
Why it matters for your business
Cost per customer that keeps falling
The same infrastructure serves ten customers or a thousand — each new one costs marginally less, and the product margin rises along with the count.
One update, every customer current
Fixes and new features ship once into the shared installation — the nightmare of maintaining dozens of different versions installed at client sites disappears.
A new customer live in minutes
Onboarding means creating a tenant, not installing a system — the gap between signed contract and actual use is measured in minutes rather than weeks.
The three data isolation models
Shared tables with a tenant_id column: all customers sit in the same tables and every row carries its tenant’s identifier. This is the cheapest option, because a schema migration runs once for everybody. The risk: one query written without the tenant_id filter shows one customer another customer’s data.
A separate schema per tenant: one database, but each customer has its own set of tables. Isolation is clearer, yet every migration must run on every schema, and the time it takes grows with the customer count.
A separate database per tenant: backing up, restoring, exporting and deleting a single customer’s data is simplest. Cost and the number of migrations grow with each new customer, so the model suits few, large customers.
The AWS Well-Architected SaaS Lens (2023) calls the dedicated end silo, the shared end pool, and the mixes bridge. A separate installation per customer is not a fourth multi-tenant model: it is single-tenant, merely hosted on the same infrastructure.
Row-level security in PostgreSQL
Row-level security (RLS) restricts, inside the database, which rows a user can see or modify. It is enabled per table with ALTER TABLE ... ENABLE ROW LEVEL SECURITY, and the rule is written with CREATE POLICY, using a USING condition that compares the tenant_id column with the current tenant. If RLS is on and the table has no policy, the default-deny rule applies: no row is visible or can be modified.
The documented trap: superusers and roles with the BYPASSRLS attribute always bypass policies, and the table owner bypasses them too unless the table has FORCE ROW LEVEL SECURITY. The application must therefore connect with a role that is neither owner nor superuser, and a test must actually try to read another tenant’s rows. Whole-table operations such as TRUNCATE and REFERENCES are not subject to RLS.
Verified on 18 November 2026 against the PostgreSQL 18 documentation, chapter 5.9 (Row Security Policies).
Want an estimate for your project?
Message us on WhatsApp. We reply the same working day, and the first 30-minute call is free.
Multi-tenant vs single-tenant
Single-tenant means each customer gets its own installation. It costs more to operate and update, but banks, public institutions and contracts with strict data-sovereignty clauses sometimes require it. Multi-tenant is the usual choice for products with many small or mid-sized customers.
Sharing has two risks. The first is the noisy neighbour: the Azure Architecture Center says that sharing a resource carries a risk that cannot be completely avoided, only reduced, through per-tenant limits and monitoring, and that tenants can be rebalanced across instances. A tenant that stays too heavy can be moved to a dedicated instance. The second is a wider blast radius: if a shared component goes down, every tenant goes down at once.
For a company: what to ask the vendor, and what it means when building
If you buy a SaaS, ask the vendor: which isolation model it uses; whether it can export or delete only your data; whether it can restore only your data from a backup; who on its team can bypass the isolation, and how that access is logged. The vendor processes your customers’ personal data on your behalf, so a data processing contract with the vendor as processor is required under the GDPR.
If you build a SaaS, choose the isolation model before the first customer: changing it later means migrating every table and every customer. For budgeting, we place a commercially launchable SaaS platform, with multi-tenant, subscriptions and an admin panel, at €15,000–60,000 (indicative).
Frequently asked questions
What does tenant mean in a SaaS application?
A tenant is a customer account, for example a company or a team, with its own users, data and settings, living in the same application instance as the other customers. Users of one tenant see only that tenant’s data, and a new customer means a new tenant, not a new installation.
What is single-tenant, and when is it preferred?
Single-tenant means a dedicated installation for each customer. It is preferred when a contract or a regulator demands physical separation or full control over the data, as with banks and public institutions. It costs more to operate, which is why many SaaS products offer it as a premium option.
Which isolation model should you choose for a new SaaS?
For many small B2B customers, shared tables with tenant_id plus row-level security are usually the starting point, being the cheapest to run. For customers whose contract or regulator demands separation, a database of their own. Mixing the two is common.
Is a multi-tenant application secure?
Yes, when isolation is enforced in one central place, through row-level security or a single data-access layer, and is tested with cross-tenant read attempts. The typical risk is a single query that forgets the tenant filter; row-level security blocks it in the database itself.
Can one heavy customer slow the application down for other tenants?
Yes, it is called the noisy neighbour problem. According to the Azure Architecture Center, the risk cannot be completely avoided, only reduced, through per-tenant limits and monitoring, and tenants can be rebalanced across instances. In practice, a tenant that stays too heavy can be moved to a dedicated instance.
Let’s talk about your project
Book a free 30-minute call or send us an email. We reply the same working day.
office@northdan.com · +40 750 252 851