Kelly Mears

Multi-Tenancy

One deployment serving many isolated customers, with tenancy threaded through data, routing, and access.

Data & Content2 min read208 words11 out · 11 in
also calledMulti-tenantTenancy

Multi-tenancy is serving many customers from one deployment, with each customer's data isolated from the others. The alternative — a separate deployment per customer — is simpler to reason about and vastly more expensive to operate.

Isolation has to be established at several layers, and a gap in any one of them is a data leak. Storage: every query must be scoped to a tenant, ideally by a mechanism that cannot be forgotten rather than by convention. Routing: a request must resolve to exactly one tenant, usually by subdomain or path. Authorization: a user's membership of a tenant must be checked, and an administrative role that spans tenants is a specific hazard — a query run as such a role returns rows from every tenant, so code that takes the first result gets an arbitrary one.

The operational shape matters too. Shared infrastructure means one tenant's load affects others, and per-tenant customization — a theme, a domain, a configuration — has to be data rather than code, or the "one deployment" property is lost.

Local development for a multi-tenant system needs the same addressing scheme as production, which is why wildcard local domains and matching origin configuration are usually required rather than optional. See Same-Origin Policy.

See also9

Headless CMS

A content system exposing structured data through an API, with presentation left entirely to consumers.

Data & Content12 connections

Draft and Published

Keeping an in-progress version of content separate from the live one, with all the state that implies.

Data & Content6 connections

Port

The numeric endpoint a network service listens on, and a scarce shared resource on a developer machine.

Systems & Tooling19 connections

Virtual Private Network

An encrypted tunnel that presents a remote network as local, and the narrow set of things a commercial one actually hides.

Networks & Distribution22 connections

Relational Database

Data organized as tables with declared relationships, queried declaratively and guarded by constraints.

Data & Content21 connections

Feature Flag

A runtime switch that decouples shipping code from enabling behavior.

Data & Content19 connections

Web Hosting

Renting space on someone else's servers to put a website online, a business that moved from free personal pages and crowded shared machines to virtual servers, rented cloud infrastructure and services that host static files at the edge of the network.

Web Platform9 connections

HTTP Cookie

A small piece of state a server asks the browser to store and send back on later requests, governed by attributes that decide exactly where it goes.

Web Platform13 connections

Cross-Site Request Forgery

Tricking a logged-in user's browser into sending a state-changing request to another site, which works because the browser attaches that site's cookies automatically.

Web Platform14 connections

Linked from11