Skip to content
Glossary · System design

Multi-tenancy

Also called multi-tenant architecture.

Definition

One running copy of a software product serving many customers, called tenants, with each tenant's data kept apart.

Last updated

What it is.

In a multi-tenant product every customer company uses the same code and servers, but sees only its own users and data. Isolation can be done in rows (a tenant ID on every record), in schemas (one schema per tenant in a shared database) or in separate databases per tenant.

Single-tenant means each customer gets their own copy of the stack. It gives stronger isolation and custom upgrades, but costs more to run and keep in sync.

Why it matters

Multi-tenancy is what makes SaaS cheap to run and easy to upgrade: one deploy updates every customer. The risk is a leak between tenants, which is one of the worst bugs a B2B product can have. The isolation model also decides how easy it is to meet data location or enterprise isolation requests later.

In a product build

We pick the isolation model before the first table is created, since moving later is a migration of every row. We enforce the tenant check in one shared layer or in the database itself, and add tests that try to read across tenants.

Watch out

Common mistakes.

  1. 01

    Relying on every developer to remember a tenant filter in every query.

  2. 02

    Forgetting tenant scope in caches, search indexes, file storage and background jobs.

  3. 03

    Letting one large tenant's heavy jobs slow down everyone else, with no per-tenant limits.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab