multi-tenancy
One running system serving several separate customers, called tenants, while keeping each one's data and settings apart.
A single missed tenant filter exposes one customer’s data to another.
In more detail
Every request must be tied to its tenant, and a mistake can expose one tenant's data to another. The tenant should come from verified identity, such as a signed token, never from the request body, and be applied to every query automatically. Software-as-a-service products are usually built this way.
Related terms
- row-level security — A database feature that filters which rows each query may see or change, using policies the database enforces itself.
- repository pattern — Putting all the code that reads and writes one kind of data behind a single object, so the rest of the app never talks to the database directly.
- connection pool — A set of already open database connections that a program reuses instead of opening a new one for each request.
- defense in depth — Using several independent protections, so that if one fails another still limits the damage.
- Server Name Indication — A TLS extension where the client names the host it wants in the first handshake message, so one IP address can serve certificates for many domains.
- AsyncLocalStorage — A Node.js class that keeps a value, such as the current request's ID, available to every function called during one asynchronous operation, without passing it as an argument.
Taught in
- Multi-Tenant Identity: Tenant Isolation & Middleware — Production Full-Stack Engineering
- Structured Logging & Correlation IDs: Context Stitching — Production Full-Stack Engineering
- Full-Stack System Verification: Capstone Integration — Production Full-Stack Engineering
- Routing & Middleware: Path Parsing & Async Context — Node.js Internals & Backend Services
- TLS & HTTPS Encryption: Certificates & SNI Contexts — Node.js Internals & Backend Services