What is multi-tenancy?
Most SaaS products are multi-tenant. The whole design rests on one promise: no customer ever sees another's data.
In short
Multi-tenancy is a software design in which one running application and one database serve many customers, called tenants, while each tenant sees only its own data. It is how most SaaS products work. The design stands or falls on isolation: every query must be scoped to the right tenant, enforced by the database or by one shared layer.
Also called: Multi-tenant architecture, Tenant isolation
Why it matters when your prototype goes to production
A prototype usually has one tenant: you. The first time a second company signs up, every query that forgot to filter by tenant becomes a leak. It will not show in testing, because each tester only looks at their own account.
Two ways to enforce it
- In the database, with row-level security policies on every table. Looph runs row-level security on all 172 of its tables, with 1,180 policies.
- In one application layer that adds the tenant to every query. Zulu moved its workspace boundary there: 67 of its 70 tables carry a workspace and are swept by a cross-tenant test.
Either can be right. What matters is that there is one enforced rule rather than a filter each developer, or each prompt, has to remember, and a test that tries to cross the wall.
Common questions
Is multi-tenant less secure than single-tenant?
Not inherently. It concentrates the risk in one place, isolation, so that one place has to be enforced and tested rather than assumed.
Related terms
Read next
Sources
More on this: Production architecture & security · All glossary terms
Built something in Lovable you want people to rely on?
We are the engineers who take it the rest of the way — secured, tested, released and supported.