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
運用中の 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
690
詳解 WindowInsets
ytakahashi
4
3.1k
Navigation Architecture Component によるアプリ内遷移の管理
ytakahashi
14
7.2k
MotionLayout Basics
ytakahashi
3
920
Other Decks in Programming
See All in Programming
Cache-moi si tu peux : patterns et pièges du cache en production - Devoxx France 2026 - Conférence
slecache
0
350
How We Benchmarked Quarkus: Patterns and anti-patterns
hollycummins
1
190
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
140
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
340
AI-DLC Deep Dive
yuukiyo
9
5.7k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
380
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
380
[RubyKaigi 2026] Require Hooks
palkan
1
310
cloudnative conference 2026 flyle
azihsoyn
0
170
Terraform言語の静的解析 / static analysis of Terraform language
wata727
1
140
【26新卒研修資料】TDD実装演習
dip_tech
PRO
0
180
🦞OpenClaw works with AWS
licux
1
350
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
190
Deep Space Network (abreviated)
tonyrice
0
130
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
170
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
210
Measuring & Analyzing Core Web Vitals
bluesmoon
9
820
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
690
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
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