Skip to content

Design Decisions

MD Rashid Hussain edited this page Aug 20, 2024 · 2 revisions

Strategy for multi-tenancy

Parameter Strategy #1 (Tenant ID field in User Table) Separate database for each tenant
Management Complexity Easy to Medium Hard
Mobile Client Easy (Same strategy for both web and mobile) Will be different, also multi-tenant apps are complex and can be rejected by app stores
Security More secure
- Not identifying the user from request headers
- User itself says where it belongs
Less secure
- prone to security vulnerability as the tenant is found from the request headers
Data compliance Less compliant
- difficult to store data differently, as they are stored within the same db with tenantIDs
More Compliant
- A change in the database url would make the complete migration of users to a different place (also a matter of complexity)
Scalable Less scalable
- All in single database
- Spike in a single tenant may decrease throughput and increase latency for all tenants
More scalable
- Separate databases
- Load on a certain tenant will not hamper other tenants
Clone this wiki locally