ENES

Multi-tenancy

One running system serving many customers, each seeing only its own data.

One building with one shared foundation holds three apartments, each a different company with its own locked door

Multi-tenancy is a design where a single installation of software, with its servers and databases, serves many customers at once. Each customer is a tenant. When a thousand companies use the same project management app, they are almost always on the same system, yet each one only sees its own projects and users.

It is what makes SaaS affordable: the provider runs and updates one system instead of a thousand, and spreads hardware costs across everyone. The cloud itself is multi-tenant too: your virtual machine may share a physical server with strangers' machines, kept apart by the hypervisor.

The hard part is isolation. Every query must be filtered by tenant, because one bug that forgets the filter can show one company's data to another. There is also the noisy neighbor problem: one tenant running a huge report can slow everyone down. Designs range from all tenants in shared tables with a tenant_id column, to a separate database per tenant, to a fully separate copy for big customers, which is called single-tenant.

Keep in mind

Go deeper

Related terms

More in Cloud