What it means

A multi-tenant system serves many customers — tenants — from shared infrastructure. Each tenant sees only its own data and settings, while the code, servers and upgrades are shared.

Ways to isolate tenants

There are three common patterns, from most shared to most separate:

  • Shared tables, where every row carries a tenant identifier that every query must filter on.
  • A separate schema or database per tenant inside a shared server.
  • Fully separate deployments for tenants with strict requirements.

Where AI makes it harder

AI features add new places data can leak: retrieval indexes, prompt logs, caches and fine-tuning sets. Each needs the same tenant boundary as the main database, and tests that prove one tenant cannot retrieve another tenant’s content.

Read as Markdown ← All basics