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
Moving from single tenant to multi tenant
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Pubudu
October 10, 2024
Technology
0
42
Moving from single tenant to multi tenant
AWS Community Day NL - 2024
Pubudu
October 10, 2024
Tweet
Share
More Decks by Pubudu
See All by Pubudu
AWS Summit Amsterdam 2023 - SVS204
pubudusj
1
22
COM202 Dev Chat at re:Invent 2022
pubudusj
1
84
Manage webhooks at scale with AWS Serverless
pubudusj
0
55
Smart Doorbell with AWS Serverless - AWS UG Coimbatore
pubudusj
0
66
Smart Doorbell with AWS Serverless - Serverless Summit 21
pubudusj
0
96
Other Decks in Technology
See All in Technology
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
2k
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
0
160
Context Engineeringの取り組み
nutslove
0
370
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
460
Kiro IDEのドキュメントを全部読んだので地味だけどちょっと嬉しい機能を紹介する
khmoryz
0
200
Why Organizations Fail: ノーベル経済学賞「国家はなぜ衰退するのか」から考えるアジャイル組織論
kawaguti
PRO
1
130
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.4k
20260204_Midosuji_Tech
takuyay0ne
1
160
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
380
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.6k
Context Engineeringが企業で不可欠になる理由
hirosatogamo
PRO
3
620
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
670
Featured
See All Featured
Amusing Abliteration
ianozsvald
0
100
30 Presentation Tips
portentint
PRO
1
220
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
210
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
280
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Un-Boring Meetings
codingconduct
0
200
BBQ
matthewcrist
89
10k
The Cult of Friendly URLs
andyhume
79
6.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
Transcript
Rearchitecting for scalability: Pubudu Jayawardana Moving a mission critical application
from single-tenant to multi-tenant Ryno Marree ACD302 AWS Community Day NL 2024
Agenda • What is single-tenancy and multi-tenancy • Use case:
at PostNL - Why migrate to multi-tenancy - Migration steps • Results 2
3 Pubudu Senior Solutions Software Engineer @ PostNL Ryno Senior
Solutions Software Engineer @ PostNL About Us
4 01 Single-tenancy & Multi-tenancy
5 Flexibility Control Cost-effectiveness Scalability SAAS Resource isolation
6 Single-tenancy vs Multi-tenancy
7 Single-tenancy
8 Single-tenancy • Enhanced security • High resilience • Customizability
• Compliance • Troubleshooting Pros
9 Single-tenancy • Higher costs • Scaling challenges • Maintenance
is hard • Longer deployment cycles Cons
10 Multi-tenancy
11 Multi-tenancy Pros Cons • Cost efficient • Scalability •
Easy to manage • Faster updates • Resource optimization • Security concerns • Compliance is complex • Limited customizations • Noisy neighbour issues
12 02 Use case
Mail items per day Parcels per day 1.1 million 6.9
million PostNL in figures - volume 13 End 2023
EBE – Event Broker E-Commerce 14
EBE – Event Broker E-Commerce 15 ✓ Self-service ✓ Helps
decoupling of other applications ✓ Integration as service
EBE – Event Broker E-Commerce (Simplified version) 16 PUSH 10M
17 EBE – Single-tenant approach
18 EBE – Single-tenant approach
19 Limitations • Higher deployment time • ~ 8 minutes
per stack • ~ 2 hours to update all (even with parallelization) • AWS resource limits • Cloudformation APIs • Code Deploy • API GW • Custom solution to prevent throttling • Cost • Lots of identical resources
No downtime Migration: Constraints No action required by the users
20
Migration: Multiple stages Producers Consumers HTTPS SQS HTTPS SQS 21
Producers: HTTPS Deploying endpoint + API GW deployment No deployments
22
Producers: SQS Still use producer specific resources • Access controls
– cannot see which AWS account a message came from • We still want alarms per producer 23
Quick note: Deployments Simplicity Barebones Complexity Feature rich CloudFormation 24
Consumers: Overview 25
Consumers: Single-tenant 26
"Multi-tenant" consumer 27
Migration: Single- to multi-tenant pattern 28
Migration: strategy • Events need to be more self-descriptive •
Dynamic vs static config o Environment vars vs DynamoDB Bundle Dynamic 29
Migration: Strategy • Big bang vs small increments • Many
small blue-green or canary deployments • Switching ESM's was safe and easy 30
31 03 Results
32 Results • Faster deployments • Creation of producer/consumer ~1
minute (from 8 minutes) • No re-deploy all • Cost reduction • Code Deploy • Alarms • KMS • Lambda
33 But... what about the cons? In EBE: • No
strict compliance requirements • Very little customizations pre producer/consumer • Solutions for noisy neighbours -> ESM concurrency
34 Summary Single-tenancy Multi-tenancy • Limited number of customers •
Will not grow fast • Compliance • Customizations • You need to scale
35 Thank you!