HOW TO SAFELY SPLIT YOUR MULTI-TENANT APPLICATION (BASED ON REAL EXAMPLES!)
summary
Real case: a single Rails multi-tenant app for ApplyFor splits into two regionally isolated deployments by choosing full separation (two apps, two DBs) and doing the migration in two stages. Stage one uses DNS geolocation + load balancers with 302 redirects and rel=alternate links to route users; stage two adds a bucket column to tables, fills it top‑down from tenant.country, copies filtered DB tables (faster than deletes), migrates files to region folders with fallback, rehearses, notifies clients, and succeeds without data loss.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 1:16Multi-tenant growth challenge
- 4:09Multi-region data compliance case
- 7:22Approaches to split data
- 9:49Gradual migration strategy
- 11:39DNS user redirection
- 15:14Step-by-step region splitting
- 17:22Bucketing for separation
- 21:00Top-down data splitting
- 24:10File separation & migration finalization
- 25:59Go-live checklist
- 28:10Summary
related talks
25mMultitenancy with Rails
28mDivide and Conquer: Multi-tenancy in Postgres
30mMulti-tenancy strategies with Django+PostgreSQL
25mSaaS on Rails on PostgreSQL
52mMultitenancy: cost-efficient and scalable patterns for Software-as-a-Service
26mMultitenant Web Applications with Phoenix
25mMulti-Tenancy Architecture Lessons Learned
14mEasier Queries for Multi-Tenant SaaS Apps
