Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Multi-tenancy in Rails
Search
Chris Stefano
February 06, 2014
Programming
130
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Multi-tenancy in Rails
Overview of multi-tenancy in Rails and the apartment gem. Presented at RubyFuza 2014
Chris Stefano
February 06, 2014
More Decks by Chris Stefano
See All by Chris Stefano
Deploying with Heroku
virtualstaticvoid
1
50
Rails 3 Generators
virtualstaticvoid
0
52
Other Decks in Programming
See All in Programming
The Rails Doctrine Decade
koic
2
590
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
230
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
220
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
310
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
160
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
3.7k
Kotlinの15年とServer-Side Kotlin
n_takehata
1
150
contenteditable と日本語入力に向き合う
colorful12
0
200
残高管理から台帳サービスへの進化
artoy
1
200
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
480
sbt 2.0: takeoff
eed3si9n
0
160
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Optimizing for Happiness
mojombo
378
71k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
640
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Balancing Empowerment & Direction
lara
6
1.3k
Making Projects Easy
brettharned
120
6.8k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Prompt Engineering for Job Search
mfonobong
0
520
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