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
1
2.7k
運用中の Rails アプリをマルチテナント対応して新規サービスをリリースするまでの道のり
2022/08/25 開催
【Railsエンジニア集合!】身近だけど知らないtoBサービスの裏側をのぞく
https://estie.connpass.com/event/255928/
Yuta Takahashi
August 25, 2022
Tweet
Share
More Decks by Yuta Takahashi
See All by Yuta Takahashi
開発チームの生産性向上に取り組む
ytakahashi
1
570
詳解 WindowInsets
ytakahashi
4
2.8k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
6.8k
MotionLayout Basics
ytakahashi
3
870
Other Decks in Programming
See All in Programming
一緒に働きたくなるプログラマの思想 #QiitaConference
mu_zaru
81
21k
iOSアプリで測る!名古屋駅までの 方向と距離
ryunakayama
0
160
UMAPをざっくりと理解 / Overview of UMAP
kaityo256
PRO
3
1.5k
AIコーディングの理想と現実
tomohisa
37
40k
カウシェで Four Keys の改善を試みた理由
ike002jp
1
140
Improve my own Ruby
sisshiki1969
1
110
ニーリーQAのこれまでとこれから
nealle
2
790
flutter_kaigi_mini_4.pdf
nobu74658
0
150
eBPF超入門「o11yに使える」とは (20250424_eBPF_o11y)
thousanda
1
120
データと事例で振り返るDevin導入の"リアル" / The Realities of Devin Reflected in Data and Case Studies
rkaga
1
1k
On-the-fly Suggestions of Rewriting Method Deprecations
ohbarye
3
5.4k
ComposeでWebアプリを作る技術
tbsten
0
130
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
How to Ace a Technical Interview
jacobian
276
23k
Writing Fast Ruby
sferik
628
61k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Designing for Performance
lara
608
69k
Faster Mobile Websites
deanohume
307
31k
Site-Speed That Sticks
csswizardry
6
540
YesSQL, Process and Tooling at Scale
rocio
172
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
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