SlideShare a Scribd company logo
How to choose the right messaging
service for your workload
How to choose the right messaging service
O(n)
NP
P
NP-Hard
NP-Complete
Yan Cui
http://theburningmonk.com
@theburningmonk
AWS user since 2010
Yan Cui
http://theburningmonk.com
@theburningmonk
Developer Advocate @
Yan Cui
http://theburningmonk.com
@theburningmonk
Independent Consultant
advise
training delivery
How to choose the right messaging service
AWS services are the new data structures.
Understanding their trade-offs is the new big O notation.
Event-Driven Architecture
Event-Driven Architecture
event stuff happens
?
event stuff happens
EventBridge
publisher
publisher
publisher
consumer
consumer
consumer
service
service
service
service
service
service
service
service
service
service
service
service
service
service
service
service
event
event
FIFO
Archiving
Replays
Schema Discovery
event
FIFO
Archiving
Replays
Schema Discovery
Scalability
Cost
Performance
Debugging
Error Handling
Kinesis
EventBridge
SNS SQS DynamoDB
Stream
IOT Core
…
picking the right AWS service is a valuable skill
Kinesis
EventBridge
SNS SQS DynamoDB
Stream
IOT Core
…
Scaling
How to choose the right messaging service
What are the scaling
constraint for the
messaging service?
Google “{service name} quotas”
How to choose the right messaging service
How to choose the right messaging service
How to choose the right messaging service
How does Lambda’s
concurrency scale
with throughput?
Concurrency
Msgs/s
Concurrency
Msgs/s
SNS EventBridge
https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html
Concurrency
Msgs/s
SNS EventBridge
SQS
Concurrency
Msgs/s
SNS EventBridge
SQS
Kinesis
https://amzn.to/2RudmGV
Concurrency
Msgs/s
SNS EventBridge
SQS
Kinesis
more concurrency is not always better…
one invocation
per message
SNS
Lambda
Downstream
System
SNS
Lambda
msg/s
time
max throughput
erred and retried
SNS EventBridge
msg/s
time
max throughput
erred and retried
SNS EventBridge
msg/s
time
processed
max throughput amortised
received
Kinesis
if you want…
maximum
throughput
precise control
over throughput
SNS EventBridge Kinesis Provisioned
if you want…
maximum
throughput
precise control
over throughput
SNS EventBridge Kinesis Provisioned
Downstream
System
SNS
Lambda
use Reserved
Concurrency to
limit concurrency
Reserved Concurrency are taken out of the
available regional Lambda concurrency
managing Reserved Concurrency for many
functions is dif
fi
cult and error prone, easy to
create more problems than it solves
Costs
always factor scale into the equation
$10.836
1 msg/s for a month, 1KB per msg
1 x 60s x 60m x 24hr x 30days
@ $0.014 per mil
+
24hrs x 30days
@ $0.015 per shard per hr
$2.592
SNS
SQS
EventBridge
Kinesis
1 x 60s x 60m x 24hr x 30days
@ $1.00 per mil
1 x 60s x 60m x 24hr x 30days
@ $0.40 per mil
1 x 60s x 60m x 24hr x 30days
@ $0.50 per mil
$1.037
$1.296
Kinesis on-demand mode pricing
$10.836
1 msg/s for a month, 1KB per msg
1 x 60s x 60m x 24hr x 30days
@ $0.014 per mil
+ 24hrs x 30days
@ $0.015 per shard per hr
$2.592
SNS
SQS
EventBridge
Kinesis Provisioned
1 x 60s x 60m x 24hr x 30days
@ $1.00 per mil
1 x 60s x 60m x 24hr x 30days
@ $0.40 per mil
1 x 60s x 60m x 24hr x 30days
@ $0.50 per mil
$1.037
$1.296
Kinesis On-Demand
1kb x 60s x 60m x 24hr x 30days
@ $0.08 per GB ingested
+ 24hrs x 30days
@ $0.04 per stream per hr
$28.998
$47.088
1,000 msg/s for a month, 1KB per msg
1000 x 60s x 60m x 24hr x 30days
@ $0.014 per mil
+ 24hrs x 30days
@ $0.015 per shard per hr
$2592.00
SNS
SQS
EventBridge
Kinesis Provisioned
1000 x 60s x 60m x 24hr x 30days
@ $1.00 per mil
1000 x 60s x 60m x 24hr x 30days
@ $0.40 per mil
1000 x 60s x 60m x 24hr x 30days
@ $0.50 per mil
$1036.80
$1296.00
Kinesis On-Demand
1000kb x 60s x 60m x 24hr x 30days
@ $0.08 per GB ingested
+ 24hrs x 30days
@ $0.04 per stream per hr
$226.55
services that charge by uptime are order(s) of magnitude
cheaper when running at scale
National broadcaster of Finland
National broadcaster of Finland
500+ millions events per day, peaks at 600K+ messages/min
National broadcaster of Finland
500+ millions events per day, peaks at 600K+ messages/min
Anahit Pogosova
National broadcaster of Finland
500+ millions events per day, peaks at 600K+ messages/min
Anahit Pogosova
decisions driven by
cost ef
fi
ciency
National broadcaster of Finland
500+ millions events per day, peaks at 600K+ messages/min
Anahit Pogosova
National broadcaster of Finland
500+ millions events per day, peaks at 600K+ messages/min
Anahit Pogosova
fallback in case
Kinesis is down
Error Handling
How to choose the right messaging service
0, 1, 2
DLQs only capture the failed event
DLQ
How to choose the right messaging service
How to choose the right messaging service
SNS, SQS, Lambda,
EventBridge
How to choose the right messaging service
How to choose the right messaging service
How to choose the right messaging service
prefer Lambda destination over DLQs
(you can use both together, but there’s no clear reason for doing so)
How to choose the right messaging service
How to choose the right messaging service
Kinesis
EventBridge
SNS SQS DynamoDB
Stream
DLQ
Observability
A measure of how well the internal state of an
application can be inferred from its external outputs
X-Ray
How to choose the right messaging service
How to choose the right messaging service
X-Ray doesn’t trace through many
popular messaging services.
X-Ray doesn’t trace through many
popular messaging services.
Need separate solution (e.g.
correlation IDs) for Lambda logs.
How to choose the right messaging service
all the indirect invocations
are accounted for
How to choose the right messaging service
all the Lambda logs from
the transaction in
chronological order
How to choose the right messaging service
How to choose the right messaging service
Step 1.
Step 2.
No manual instrument.
Better support for messaging services.
Supports containers and Lambda.
“which messaging service should I use?”
How to choose the right messaging service
task vs event
Task Event
“Something happened”
“Go do a thing”
Task Event
“Something happened”
“Go do a thing”
Intended for a target receiver.
Task Event
“Something happened”
“Go do a thing”
Intended for a target receiver.
Often expects an answer.
Task Event
“Something happened”
“Go do a thing”
Intended for a target receiver. Publishers are obvious to subscribers.
Often expects an answer.
How to choose the right messaging service
How to choose the right messaging service
How to choose the right messaging service
How to choose the right messaging service
How to choose the right messaging service
EventBridge
SNS FIFO
Do Stuff!
EventBridge SNS FIFO
Do Stuff!
EventBridge SNS FIFO
Do Stuff!
order is lost
EventBridge
SNS FIFO
Do Stuff!
order is lost
EventBridge
SNS FIFO SQS FIFO
Do Stuff (in order)!
Other subscribers
(not my problem!)
How to choose the right messaging service
Kinesis Lambda
EventBridge
Kinesis Lambda
Other subscribers
(not my problem!)
send domain events
service
service
service
service
service
service
service
service
service
service
service
service
service
How to choose the right messaging service
https://theburningmonk.com/hire-me
Advise
Training Delivery
“Fundamentally, Yan has improved our team by increasing our
ability to derive value from AWS and Lambda in particular.”
Nick Blair
Tech Lead
@theburningmonk
theburningmonk.com
github.com/theburningmonk

More Related Content

PDF
Architecting for Success: Designing Secure GCP Landing Zone for Enterprises
PDF
An introduction to Amazon SQS
PPTX
The RabbitMQ Message Broker
ODP
Introduction to Amazon Web Services
PPTX
An introduction to Serverless
PDF
How to choose the right messaging service for your workload
PDF
[금융사를 위한 AWS Generative AI Day 2023] 4_AWS Generative AI 서비스의 활용 방ᄇ...
PDF
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
Architecting for Success: Designing Secure GCP Landing Zone for Enterprises
An introduction to Amazon SQS
The RabbitMQ Message Broker
Introduction to Amazon Web Services
An introduction to Serverless
How to choose the right messaging service for your workload
[금융사를 위한 AWS Generative AI Day 2023] 4_AWS Generative AI 서비스의 활용 방ᄇ...
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)

What's hot (20)

PDF
Rabbitmq basics
PDF
Kurly는 AWS를 어떻게 사용하고 있을까? - 성공적 리테일 디지털 트랜스포메이션 사례 - 박경표 AWS 솔루션즈 아키텍트 / 임상석...
PDF
Serverless Computing
PPTX
Content Delivery Network - CDN
PDF
PDF
Designing loosely coupled services
PDF
Amazon EventBridge
PPT
Cloud computing
PDF
AWS Personalize 중심으로 살펴본 추천 시스템 원리와 구축
PPTX
Amazon simple storage service (amazon s3)
PDF
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
PDF
컨텐트 협업플랫폼 Amazon WorkDocs 활용하기 - 박상희 상무, 한글과컴퓨터 / Ben Fitzpatrick, Head of Bu...
PPTX
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
PPTX
Serverless computing
PDF
Building Event-driven Architectures with Amazon EventBridge
PDF
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
PDF
Lambda and DynamoDB best practices
PPTX
Serverless Architecture
PDF
Amazon Personalize Event Tracker 실시간 고객 반응을 고려한 추천::김태수, 솔루션즈 아키텍트, AWS::AWS ...
PDF
AWS Elastic Beanstalk(初心者向け 超速マスター編)JAWSUG大阪
Rabbitmq basics
Kurly는 AWS를 어떻게 사용하고 있을까? - 성공적 리테일 디지털 트랜스포메이션 사례 - 박경표 AWS 솔루션즈 아키텍트 / 임상석...
Serverless Computing
Content Delivery Network - CDN
Designing loosely coupled services
Amazon EventBridge
Cloud computing
AWS Personalize 중심으로 살펴본 추천 시스템 원리와 구축
Amazon simple storage service (amazon s3)
마이크로서비스 기반 클라우드 아키텍처 구성 모범 사례 - 윤석찬 (AWS 테크에반젤리스트)
컨텐트 협업플랫폼 Amazon WorkDocs 활용하기 - 박상희 상무, 한글과컴퓨터 / Ben Fitzpatrick, Head of Bu...
AWS 12월 웨비나 │클라우드 마이그레이션을 통한 성공사례
Serverless computing
Building Event-driven Architectures with Amazon EventBridge
실전! AWS 하이브리드 네트워킹 (AWS Direct Connect 및 VPN 데모 세션) - 강동환, AWS 솔루션즈 아키텍트:: A...
Lambda and DynamoDB best practices
Serverless Architecture
Amazon Personalize Event Tracker 실시간 고객 반응을 고려한 추천::김태수, 솔루션즈 아키텍트, AWS::AWS ...
AWS Elastic Beanstalk(初心者向け 超速マスター編)JAWSUG大阪

Similar to How to choose the right messaging service (20)

PDF
Streams and serverless at DAZN
PPTX
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
PDF
Building Event-Driven Applications with Serverless and AWS - AWS Summit New York
PDF
마이크로 서비스 아키텍처와 앱 모던화 – 김일호 :: AWS Builders Online Series
PDF
Komunikacja oparta o zdarzenia z wykorzystaniem AWS Event Bridge
PDF
Choosing the right messaging service for your serverless app [with lumigo]
PDF
How to build a social network on serverless
PPTX
Big Data Pipeline and Analytics Platform Using NetflixOSS and Other Open Sour...
PPTX
Big Data Pipeline and Analytics Platform
PDF
How to build a social network on serverless | Yan Cui
PDF
How to build a social network on Serverless (AWS Community Summit)
PPTX
AWS: Messaging Services in AWS Presentation
PDF
How to build a social network on serverless
PPTX
Amazon aws big data demystified | Introduction to streaming and messaging flu...
PDF
Collecting 600M events/day
PDF
Serverless Design Patterns (London Dev Community)
PDF
NATS - A new nervous system for distributed cloud platforms
PPTX
Captial One: Why Stream Data as Part of Data Transformation?
PDF
Telemetry: The Overlooked Treasure in Axon Server-Centric Applications
PDF
Streams and serverless at DAZN
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Building Event-Driven Applications with Serverless and AWS - AWS Summit New York
마이크로 서비스 아키텍처와 앱 모던화 – 김일호 :: AWS Builders Online Series
Komunikacja oparta o zdarzenia z wykorzystaniem AWS Event Bridge
Choosing the right messaging service for your serverless app [with lumigo]
How to build a social network on serverless
Big Data Pipeline and Analytics Platform Using NetflixOSS and Other Open Sour...
Big Data Pipeline and Analytics Platform
How to build a social network on serverless | Yan Cui
How to build a social network on Serverless (AWS Community Summit)
AWS: Messaging Services in AWS Presentation
How to build a social network on serverless
Amazon aws big data demystified | Introduction to streaming and messaging flu...
Collecting 600M events/day
Serverless Design Patterns (London Dev Community)
NATS - A new nervous system for distributed cloud platforms
Captial One: Why Stream Data as Part of Data Transformation?
Telemetry: The Overlooked Treasure in Axon Server-Centric Applications

More from Yan Cui (20)

PDF
How to win the game of trade-offs
PDF
Patterns and practices for building resilient serverless applications.pdf
PDF
Lessons from running AppSync in prod
PDF
Serverless observability - a hero's perspective
PDF
How to ship customer value faster with step functions
PDF
How serverless changes the cost paradigm
PDF
Why your next serverless project should use AWS AppSync
PDF
Build social network in 4 weeks
PDF
Patterns and practices for building resilient serverless applications
PDF
How to bring chaos engineering to serverless
PDF
Migrating existing monolith to serverless in 8 steps
PDF
Building a social network in under 4 weeks with Serverless and GraphQL
PDF
FinDev as a business advantage in the post covid19 economy
PDF
How to improve lambda cold starts
PDF
What can you do with lambda in 2020
PDF
A chaos experiment a day, keeping the outage away
PDF
How to debug slow lambda response times
PDF
What can you do with lambda in 2020
PDF
How to ship customer value faster with step functions
PDF
Debugging Lambda timeouts
How to win the game of trade-offs
Patterns and practices for building resilient serverless applications.pdf
Lessons from running AppSync in prod
Serverless observability - a hero's perspective
How to ship customer value faster with step functions
How serverless changes the cost paradigm
Why your next serverless project should use AWS AppSync
Build social network in 4 weeks
Patterns and practices for building resilient serverless applications
How to bring chaos engineering to serverless
Migrating existing monolith to serverless in 8 steps
Building a social network in under 4 weeks with Serverless and GraphQL
FinDev as a business advantage in the post covid19 economy
How to improve lambda cold starts
What can you do with lambda in 2020
A chaos experiment a day, keeping the outage away
How to debug slow lambda response times
What can you do with lambda in 2020
How to ship customer value faster with step functions
Debugging Lambda timeouts

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PDF
KodekX | Application Modernization Development
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
NewMind AI Monthly Chronicles - July 2025
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Per capita expenditure prediction using model stacking based on satellite ima...
Dropbox Q2 2025 Financial Results & Investor Presentation
Chapter 3 Spatial Domain Image Processing.pdf
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
“AI and Expert System Decision Support & Business Intelligence Systems”
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
KodekX | Application Modernization Development
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The AUB Centre for AI in Media Proposal.docx
NewMind AI Monthly Chronicles - July 2025

How to choose the right messaging service