1:1 mentoring with Big Tech AI engineers
System Design

Multi-Tenant Isolation

Choose the tenancy tier by sensitivity, derive the tenant from the verified token once, enforce it in layers below the code that could forget it, keep noisy neighbours from starving each other, and test for leaks before a customer does.

Last updated

Production12 min readFirst readSecurity OverviewMetadata & Filters

After this section you can

  • Choose a tenancy tier for each group of tenants, and name the provider limits it inherits
  • Derive the tenant from the verified token once, and bind the store so a dropped filter cannot leak
  • Prove isolation with canary tenants and a role-by-role check, with a second approver for break-glass
15

Multi-Tenant Isolation

Choose the tier by sensitivity, derive the tenant from the verified token once, and prove the boundary with canary tenants.

Key idea

Tenancy is decided once, from the verified token, and enforced below the code that could forget it. How much you share is a dial set by sensitivity, not by budget.

Three tiers, one tenant ID: every layer filters on it
FROM THE VERIFIED TOKEN WHO SITS WHERE Verified token tenant_id: beta Pool one store, index, key and workspace Bridge shared index, a bucket and a key each Silo its own store, index and key 800 self-serve tenants about 40 mid-market tenants three hospital systems

Illustrative: the group sizes are assumptions, not data. Pans sideways on a phone.

Related

More in System Design

Get full access to all 149 sections with code examples, diagrams, and interactive animations.

Unlock Premium