Multi-tenant

One app serves many customers, each with separate data.

What it is

Multi-tenant means one app serves many customers. Each customer's data is isolated in the same database. One update reaches all customers.

Why it matters

Multi-tenant is what makes SaaS cost-effective. A separate stack for each customer would cost more and slow down every release.

How to use

  • Add a tenant_id to every database row from day one.
  • Use row-level security to keep each customer's data apart.
  • Watch for accidental cross-tenant data leaks.
  • Set rate limits to prevent noisy neighbour issues.

FAQ

  • One database or many?

    One shared database with row-level security for most SaaS. Separate databases for enterprise or regulated workloads.