Skip to content
IT glossary
ArchitectureUpdated December 3, 2026

Multitenancy

Мультитенантность

A shared service can support multiple customers or workspaces while keeping their data, settings, and permissions separate. Each of those customer groups or workspaces is called a tenant.

Also known as: multi-tenant

What counts as a tenant?

Think of a hosted help desk used by several companies. They run on the same service, but each company has its own tickets, staff roles, and settings. In that product, the company is the tenant: the unit the system uses to decide what belongs together and what must stay separate. In another product, the tenant might be a workspace. A tenant is not a login: one workspace can have many members, and the same person can belong to several workspaces.

What gets shared?

A multi-tenant product does not have to put every customer's data in one database. The application can be shared while storage is split in different ways:

  • Shared tables: Tenant-owned rows carry a tenant_id. Onboarding can be as simple as creating a tenant record, but queries and database constraints must respect tenant boundaries.
  • Separate schemas: Each tenant has its own set of tables inside a shared database. The application must select the right schema, and schema changes have to reach every tenant.
  • Separate databases: This can make customer-specific backup and restore simpler, at the cost of managing more connections, migrations, and databases.

A service can mix these approaches, for example by reserving dedicated databases for customers with stricter isolation requirements.

Example: opening a support ticket

In /workspaces/acme/tickets/42, acme tells the server which workspace the user wants to open. It does not grant access. The server checks the user's membership and permissions, then uses the verified workspace ID when fetching the ticket:

SELECT id, subject, status
FROM tickets
WHERE tenant_id = $1 AND id = $2;

Here $1 is the verified tenant ID and $2 is the ticket ID. Even a globally unique ticket ID isn't proof that the caller can read it. With shared tables, database row-level security can add a second layer of protection, but tenant isolation still doesn't tell you whether a particular user can edit or close a ticket.

What tends to go wrong?

Multi-tenant architecture is common in SaaS products such as project trackers and billing platforms. Sharing infrastructure can lower per-customer costs and simplify rollouts, but tenant boundaries must hold beyond the main API. Cache keys for tenant-owned records should include the tenant ID, and background jobs need tenant context too. Also distinguish data isolation from performance isolation: a large import can slow down other customers without exposing any data. Per-tenant quotas or limits on concurrent jobs can reduce this “noisy neighbor” effect.

How it comes up in interviews

A system design interviewer might ask how you'd host thousands of small workspaces and a few large ones. Before picking a storage model, ask how uneven the workload is, what isolation customers require, and whether you need to restore one workspace without rolling back the others. Then explain how you'd enforce the boundary and test it: seed two tenants and verify that a member of one cannot read or modify a ticket owned by the other.