{"head":{"title":"What Is Multi-Tenancy in SaaS? Definition | OceanLab","description":"Multi-tenancy means one running system serves many customers while keeping their data apart. The main isolation models, an example and the common mistakes.","canonical":"https://oceanlab.in/glossary/multi-tenancy"},"crumbs":[{"name":"Home","path":"/"},{"name":"Glossary","path":"/glossary"},{"name":"multi-tenancy","path":"/glossary/multi-tenancy"}],"slug":"multi-tenancy","term":"Multi-tenancy","aka":["multi-tenant architecture"],"category":"System design","short":"One running copy of a software product serving many customers, called tenants, with each tenant's data kept apart.","body":[["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":["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."],"example":["A clinic booking SaaS stores all clinics in one database with a clinic ID on every table. The database enforces row-level rules, so a query from one clinic cannot return another clinic's patients, even if the app code forgets a filter."],"inBuild":["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."],"mistakes":[["Relying on every developer to remember a tenant filter in every query."],["Forgetting tenant scope in caches, search indexes, file storage and background jobs."],["Letting one large tenant's heavy jobs slow down everyone else, with no per-tenant limits."]],"related":[{"href":"/glossary/rbac","label":"RBAC (role-based access control)","detail":"An access model where permissions are attached to roles, and people get access by being given a role."},{"href":"/glossary/sharding","label":"Sharding","detail":"Splitting one large dataset across several databases, called shards, by a key such as customer ID, so each shard holds only part of the data."},{"href":"/glossary/rate-limiting","label":"Rate limiting","detail":"Capping how many requests a user, API key or address can make in a given time, to protect a system and share capacity fairly."},{"href":"/glossary/sso","label":"SSO (single sign-on)","detail":"One login, managed by an identity provider, that gives a person access to many separate apps."},{"href":"/glossary/object-storage","label":"Object storage","detail":"A way of storing files as objects in buckets, each with an ID and metadata, reached over HTTP and built to scale to huge amounts of data cheaply."}],"tools":[{"href":"/tools/mvp-cost","label":"MVP cost","detail":"Free tool"},{"href":"/tools/saas-pricing-calculator","label":"SaaS pricing calculator","detail":"Free tool"}],"links":[{"href":"/software","label":"Software by industry","detail":"Systems we build per industry, with guides and tools."},{"href":"/case-studies","label":"Case studies","detail":"Product builds by OceanLab, by industry."}],"sources":[],"legal":false,"updatedAt":"2026-10-25"}