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.9k
運用中の 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
630
詳解 WindowInsets
ytakahashi
4
3k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
7k
MotionLayout Basics
ytakahashi
3
890
Other Decks in Programming
See All in Programming
イベントストーミングのはじめかた / Getting Started with Event Storming
nrslib
1
600
カンファレンス遠征を(安く)楽しむ技術
wp_daisuke
0
170
AI POSにおけるLLM Observability基盤の導入 ― サイバーエージェントDXインターン成果報告
hekuchan
0
680
CSC509 Lecture 11
javiergs
PRO
0
310
Atomics APIを知る / Understanding Atomics API
ssssota
1
150
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
5
1.7k
Verilator + Rust + gRPC と Efinix の RISC-V でAIアクセラレータをAIで作ってる話 RTLを語る会(18) 2025/11/08
ryuz88
0
360
Tangible Code
chobishiba
3
570
高単価案件で働くための心構え
nullnull
0
150
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
160
Nitro v3
kazupon
2
310
Web エンジニアが JavaScript で AI Agent を作る / JSConf JP 2025 sponsor session
izumin5210
4
1.8k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
57k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
34
2.3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Documentation Writing (for coders)
carmenintech
76
5.1k
What's in a price? How to price your products and services
michaelherold
246
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
RailsConf 2023
tenderlove
30
1.3k
Mobile First: as difficult as doing things right
swwweet
225
10k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
10
670
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
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