Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Multi-tenancy in Rails
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Chris Stefano
February 06, 2014
Programming
1
100
Multi-tenancy in Rails
Overview of multi-tenancy in Rails and the apartment gem. Presented at RubyFuza 2014
Chris Stefano
February 06, 2014
Tweet
Share
More Decks by Chris Stefano
See All by Chris Stefano
Deploying with Heroku
virtualstaticvoid
1
46
Rails 3 Generators
virtualstaticvoid
0
43
Other Decks in Programming
See All in Programming
CSC307 Lecture 04
javiergs
PRO
0
650
Architectural Extensions
denyspoltorak
0
270
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
540
Fragmented Architectures
denyspoltorak
0
140
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
290
Package Management Learnings from Homebrew
mikemcquaid
0
200
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
140
MUSUBIXとは
nahisaho
0
130
CSC307 Lecture 09
javiergs
PRO
1
830
Oxlintはいいぞ
yug1224
5
1.3k
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
510
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
130
Featured
See All Featured
The Limits of Empathy - UXLibs8
cassininazir
1
210
The Mindset for Success: Future Career Progression
greggifford
PRO
0
230
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
310
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
270
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Transcript
Multi-tenancy in Rails by Chris Stefano @virtstaticvoid Lightning Talk
The next killer app...
@tenderlove
@lgleasain
@moomoo
Multi-tenant Application
Icons by dryicons.com User is the tenant
Group of users is the tenant Icons by dryicons.com
Data?
Icons by dryicons.com Single database, tenant column
Icons by dryicons.com Database per tenant
Icons by dryicons.com Single database, schema per tenant
Requirements Icons by dryicons.com Icons by dryicons.com
Which tenant? Icons by dryicons.com
Safe data boundaries Icons by dryicons.com
Shared data? Icons by dryicons.com
Unobtrusive code
Specs + Fixture Data
Abstracts the database as an apartment
Use an elevator to activate apartment for tenant
None
None
Features ➢ Supported RDBMS Sqlite, MySQL, JDBC, Postgres & PostGIS
➢ Configuration Shared models, multi-schema, single or multi-database ➢ DB Migration support rake apartment:migrate ➢ Tenant Switching Rack middleware - host, domain, subdomain and custom ➢ Support for Background Workers delayed_job, sidekiq, resque
More Information ➢ RailsCasts #389 (Pro Subscription) http://railscasts.com/episodes/389-multitenancy-with-postgresql ➢ Multi-tenancy
with Rails (LeanPub Book) http://leanpub.com/multi-tenancy-rails ➢ apartment (Gem) http://github.com/influitive/apartment ➢ multitenant (Gem) http://github.com/wireframe/multitenant ➢ roomer (Gem) http://github.com/gosuri/roomer
Thank You Chris Stefano github.com/virtualstaticvoid @virtstaticvoid