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
運用中の Rails アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
Search
Yuta Takahashi
August 25, 2022
Programming
3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
運用中の Rails アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
2022/08/25 開催
【Railsエンジニア集合!】身近だけど知らないtoBサービスの裏側をのぞく
https://estie.connpass.com/event/255928/
Yuta Takahashi
August 25, 2022
More Decks by Yuta Takahashi
See All by Yuta Takahashi
開発チームの生産性向上に取り組む
ytakahashi
1
700
詳解 WindowInsets
ytakahashi
4
3.1k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
7.2k
MotionLayout Basics
ytakahashi
3
930
Other Decks in Programming
See All in Programming
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
180
Agentic UI
manfredsteyer
PRO
0
180
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
110
ふつうのFeature Flag実践入門
irof
8
4.1k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
160
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
370
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
290
JavaDoc 再入門
nagise
1
370
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.2k
Featured
See All Featured
Visualization
eitanlees
152
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
Why Our Code Smells
bkeepers
PRO
340
58k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
54k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
560
Designing Experiences People Love
moore
143
24k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
It's Worth the Effort
3n
188
29k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Accessibility Awareness
sabderemane
1
140
Mind Mapping
helmedeiros
PRO
1
260
Transcript
Rails 2 022 . 8 . 2 5 Thu
toB
yt-tkhs yt_hizi Android 2021 7 Flutter / Rails
: atohama SaaS
UUUO atohama 1 Rails ߪೖऀ༻ΞϓϦ ग़༻ΞϓϦ ߪೖऀ༻ΞϓϦ αʔόʔ
( )
: https://d 1 .awsstatic.com/whitepapers/ja_JP/saas-tenant-isolation-strategies.pdf
: https://d 1 .awsstatic.com/whitepapers/ja_JP/saas-tenant-isolation-strategies.pdf
citusdata/activerecord-multi-tenant gem User.all SELECT * FROM users; SELECT * FROM
users WHERE tenant_id = 1;
⾒ ID (Push )
ID (Push )
ID class Organization UUUO_ID = 1.freeze def uuuo? id ==
UUUO_ID end end
ID :
( ) ( ) ( )
None
( )
Before 1 . 2 . 1 . 2 . 3
. After
Before 1 . 2 . 1 . 2 . 3
. After
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end ID
class Organization def tenant_owner? id == tenant.owner_organization_id end def tenant_admin?
is_admin end end
: ID
ID ID UUUO atohama ߪೖऀ༻ΞϓϦ ग़༻ΞϓϦ ߪೖऀ༻ΞϓϦ αʔόʔ
ID Push ID Push UUUO jp.uuuo.maehama jp.uuuo.atohama A jp.uuuo.atohama.xxx
ID ID ( DB ) ID
ID : ID ⾒
⾒ ID (Push )
None
citusdata/activerecord-multi-tenant
Thank you! microsoft/fluentui-emoji: https://github.com/microsoft/fluentui-emoji/blob/main/LICENSE