Multitenancy: cost-efficient and scalable patterns for Software-as-a-Service
summary
Compares three concrete multitenancy patterns with working Spring Boot demos: database-per-tenant (separate DBs, Liquibase bootstraps per DB, good isolation but hits resource limits around hundreds/thousands of tenants), schema-per-tenant (shared DB, per-schema migrations, simpler connection handling but migrations must run in parallel), and shared-database with discriminator plus Postgres row level security (single schema, minimal overhead, scales to very high tenant counts). Shows Hibernate and R2DBC wiring, a shard example (max two tenants per shard in demo) and confirms the implementations work.
AI-written summary · about
chapters (13)
- 0:00Start
- 3:32Data Aggregation and Business Intelligence
- 3:58Building Software as a Service Solutions
- 6:35Data Separation Requirements
- 7:50Customizability
- 9:21Performance Isolation between Tenants
- 13:16Data Migration Tools
- 20:28The Database per Tenant Pattern
- 22:23Management Application
- 26:06Hibernate Abstraction
- 34:04Implementation Shared Database
- 36:57Row Level Security
- 46:18Takeaways
related talks
28mDivide and Conquer: Multi-tenancy in Postgres
51mMultitenant Mystery Only Rockers in the Building
25mMultitenancy with Rails
30mMulti-tenancy strategies with Django+PostgreSQL
25mSaaS on Rails on PostgreSQL
25mMulti-Tenancy Architecture Lessons Learned
58mKeeping the Noisy Neighbors Happy
26mMultitenant Web Applications with Phoenix
