Multitenancy with Rails
summary
Argues that multi‑tenancy needs concrete choices: tries postgres schemas via the apartment gem but abandons them after Heroku warns that >50 schemas breaks backups and performance, rejects gems that use thread.current as a global, then builds a small middleware called hauser to resolve tenants by subdomain and scope models, emphasizes test and regression suites to prevent leaks across tenants, and uses Stripe (not PayPal) for subscriptions because its API and docs actually work.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 2:14Multi-tenancy in Rails
- 5:01Multi-tenancy gems for Rails
- 7:29PostgreSQL schemas for isolation
- 11:24Building multi-tenancy from scratch
- 13:57Testing essentials in Rails
- 15:42Hauser gem for tenant scoping
- 17:49Regression testing fixes
- 19:12Subscriptions with Stripe
- 23:25Stripe versus PayPal for subscriptions
- 24:07Q&A
related talks
25mSaaS on Rails on PostgreSQL
52mMultitenancy: cost-efficient and scalable patterns for Software-as-a-Service
28mDivide and Conquer: Multi-tenancy in Postgres
26mMultitenant Web Applications with Phoenix
30mMulti-tenancy strategies with Django+PostgreSQL
51mMultitenant Mystery Only Rockers in the Building
29mHOW TO SAFELY SPLIT YOUR MULTI-TENANT APPLICATION (BASED ON REAL EXAMPLES!)
14mEasier Queries for Multi-Tenant SaaS Apps
