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
3.1k
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
710
詳解 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
継続モナドとリアクティブプログラミング
yukikurage
3
600
5分で問診!Composer セキュリティ健康診断
codmoninc
0
270
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
320
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
230
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
520
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
130
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
Performance Engineering for Everyone
elenatanasoiu
0
270
1B+ /day規模のログを管理する技術
broadleaf
0
140
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
110
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
97
6.7k
The SEO Collaboration Effect
kristinabergwall1
1
510
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
We Have a Design System, Now What?
morganepeng
55
8.2k
[SF Ruby Conf 2025] Rails X
palkan
2
1.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
So, you think you're a good person
axbom
PRO
2
2.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Facilitating Awesome Meetings
lara
57
7k
Testing 201, or: Great Expectations
jmmastey
46
8.2k
How STYLIGHT went responsive
nonsquared
100
6.2k
Code Review Best Practice
trishagee
74
20k
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