Easier Queries for Multi-Tenant SaaS Apps
summary
Helper libraries for Azure Cosmos DB for PostgreSQL automatically scope ORM queries to a tenant and change SQL so distributed plans hit a single shard instead of all 32 by adding the tenant filter, turning 32 tasks into one task (31 negatives, 1 hit). Libraries exist for activerecord-multi-tenant and Django multi-tenant, use composite primary keys to match per-tenant uniqueness, and are on the Citus Data GitHub — proven to be both safer (no tenant leakage) and much faster.
AI-written summary · about
chapters (7)
- 0:00Introduction to ORMs
- 1:09Multi-tenant applications
- 2:25Challenges in distributed DBs
- 3:59Schema design and setup
- 5:58Query generation analysis
- 8:27Safety and performance issues
- 10:36Optimizing with library tools
related talks
27mMulti-tenant Saas apps made simple on Azure Cosmos DB for PostgreSQL
44mMulti-tenant SaaS apps made simple on Azure Cosmos DB for PostgreSQL
14mBest Practices for Building Multi-Tenant Applications on Azure Cosmos DB
30mMulti-tenancy strategies with Django+PostgreSQL
25mSaaS on Rails on PostgreSQL
28mDivide and Conquer: Multi-tenancy in Postgres
46mDesign and build multi-tenant SaaS apps at scale with Azure Cosmos DB
58mKeeping the Noisy Neighbors Happy
