Multi-Tenancy
ELI5 - The Vibe Check
Multi-tenancy is how one app serves hundreds of different customers without building hundreds of separate apps. The question is always how much you let those customers share: one giant database with a tenant_id column stuffed on every table, a separate schema per customer, or fully separate databases, and that choice quietly decides how painful your next security bug or noisy-neighbor incident will be.
Real Talk
Multi-tenancy is an architecture where a single application instance serves multiple customers (tenants) while keeping their data logically isolated. Common patterns include a shared database with a tenant_id discriminator column, one schema per tenant, or fully isolated databases per tenant, each trading off cost, isolation guarantees, and operational complexity differently.
When You'll Hear This
"We started with shared tables and a tenant_id, now big customers want their own schema for compliance." / "A noisy tenant on the shared database was slowing down everyone else's queries."
Related Terms
Row-Level Security
Row-level security (RLS) is like having an invisible bouncer on every table row.
Schema
A database schema is the blueprint of your database — which tables exist, what columns they have, what types they are, and how they relate to each other.
Sharding
Sharding splits your database across multiple servers based on some rule — like user IDs 1-1M on server 1, 1M-2M on server 2.