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
46
0
Share
Moving from single tenant to multi tenant
AWS Community Day NL - 2024
Pubudu
October 10, 2024
More Decks by Pubudu
See All by Pubudu
AWS Summit Amsterdam 2023 - SVS204
pubudusj
1
23
COM202 Dev Chat at re:Invent 2022
pubudusj
1
87
Manage webhooks at scale with AWS Serverless
pubudusj
0
56
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
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
160
「誰一人取り残されない」 AIエージェント時代のプロダクト設計思想 Product Management Summit 2026
mizushimac
1
1.8k
Chasing Real-Time Observability for CRuby
whitegreen
0
280
AI와 협업하는 조직으로의 여정
arawn
0
530
Microsoft 365 / Microsoft 365 Copilot : 自分の状態を確認する「ラベル」について
taichinakamura
0
370
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
38k
Revisiting [CLS] and Patch Token Interaction in Vision Transformers
yu4u
0
400
マルチプロダクトの信頼性を効率良く保っていくために
kworkdev
PRO
0
180
Cortex Codeのコスト見積ヒントご紹介
yokatsuki
0
120
「責任あるAIエージェント」こそ自社で開発しよう!
minorun365
10
2.3k
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
180
Anthropic「Long-running a gents」をGeminiで再現してみた
tkikuchi
0
620
Featured
See All Featured
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
Believing is Seeing
oripsolob
1
120
4 Signs Your Business is Dying
shpigford
187
22k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
530
Designing for Timeless Needs
cassininazir
0
210
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
410
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
The Limits of Empathy - UXLibs8
cassininazir
1
310
Why Our Code Smells
bkeepers
PRO
340
58k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Code Review Best Practice
trishagee
74
20k
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!