System Design · Senior · Question 53 of 75
What are common options for tenant isolation in a multi-tenant SaaS?
- ✓Correct answer: Shared tables with a tenant id (plus row-level security), schema per tenant or database per tenant - trading cost for isolation
- 2Only one database per tenant is valid
- 3Isolation is handled by the frontend
Explanation
Row-level security in PostgreSQL enforces tenant filters in the database, reducing the risk of a forgotten WHERE tenant_id.