Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Moving from single tenant to multi tenant
Search
Pubudu
October 10, 2024
Technology
0
39
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
83
Manage webhooks at scale with AWS Serverless
pubudusj
0
54
Smart Doorbell with AWS Serverless - AWS UG Coimbatore
pubudusj
0
66
Smart Doorbell with AWS Serverless - Serverless Summit 21
pubudusj
0
94
Other Decks in Technology
See All in Technology
生成AI時代におけるグローバル戦略思考
taka_aki
0
160
Power of Kiro : あなたの㌔はパワステ搭載ですか?
r3_yamauchi
PRO
0
100
EM歴1年10ヶ月のぼくがぶち当たった苦悩とこれからへ向けて
maaaato
0
270
SSO方式とJumpアカウント方式の比較と設計方針
yuobayashi
7
600
ブロックテーマとこれからの WordPress サイト制作 / Toyama WordPress Meetup Vol.81
torounit
0
560
Overture Maps Foundationの3年を振り返る
moritoru
0
180
Karate+Database RiderによるAPI自動テスト導入工数をCline+GitLab MCPを使って2割削減を目指す! / 20251206 Kazuki Takahashi
shift_evolve
PRO
1
720
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
140
Gemini でコードレビュー知見を見える化
zozotech
PRO
1
250
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
GitHub Copilotを使いこなす 実例に学ぶAIコーディング活用術
74th
3
2.8k
5分で知るMicrosoft Ignite
taiponrock
PRO
0
340
Featured
See All Featured
Designing for humans not robots
tammielis
254
26k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
BBQ
matthewcrist
89
9.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
Automating Front-end Workflow
addyosmani
1371
200k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
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!