How is a multi-tenant architecture designed?
Multi-tenancy decides how one customer's data is kept apart from another's. The usual options are a shared database with a tenant id on every row and row-level security in PostgreSQL, a schema per tenant, or a separate database per tenant for customers with strict isolation needs. Each option has a cost in complexity and hosting. We explain the trade-offs in plain terms and choose with you, based on your customers, data sensitivity and budget.
- Tenant isolation, with tests that try to cross tenant boundaries
- Roles and permissions for owners, admins and members
- Invitations and single sign-on when your buyers ask for them
- Usage tracking if you plan to price by seats or volume
