SlideShare a Scribd company logo
How to choose the right messaging
service for your workload
How to choose the right messaging service for your workload
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 for your workload
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 for your workload
What are the scaling
constraint for the
messaging service?
Google “{service name} quotas”
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
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…
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 for your workload
0, 1, 2
DLQs only capture the failed event
DLQ
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
SNS, SQS, Lambda,
EventBridge
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
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 for your workload
How to choose the right messaging service for your workload
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 for your workload
How to choose the right messaging service for your workload
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 for your workload
all the indirect invocations
are accounted for
How to choose the right messaging service for your workload
all the Lambda logs from
the transaction in
chronological order
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
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 for your workload
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 for your workload
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
How to choose the right messaging service for your workload
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 for your workload
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 for your workload
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
How to choose the right messaging service
PDF
What is Domino IQ - DNUG Stammtisch Wien
PDF
Lambda and DynamoDB best practices
PPTX
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
PDF
Cloud Capacity Management
PDF
Target language in compiler design
PPSX
Entity beans in java
PPTX
Serverless Architecture
How to choose the right messaging service
What is Domino IQ - DNUG Stammtisch Wien
Lambda and DynamoDB best practices
Do microservices dream about CQRS-ES, Kafka Stream and BPMN ? - Voxxed micros...
Cloud Capacity Management
Target language in compiler design
Entity beans in java
Serverless Architecture

What's hot (20)

PPTX
Azure functions
PPTX
Web server and web-hosting
PPTX
Data aggregation in wireless sensor network , 11751 d5811
PPTX
What is NoSQL and CAP Theorem
PDF
Netflix Architecture Tutorial at Gluecon
ODP
Product catalog using MongoDB
PPTX
Android Library Management System
PDF
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
PDF
Hadoop & MapReduce
PPT
Hash mac algorithms
PPTX
HTML Basic, CSS Basic, JavaScript basic.
PPTX
Amazon simple storage service (amazon s3)
PPT
6 Data Modeling for NoSQL 2/2
PDF
Cloud computing Report
PPTX
Fundamental Cloud Security
PDF
Distributed Coordination-Based Systems
PDF
Cloud Based Covid 19 Testing Management System
DOCX
E commerce use case documentation.
PPTX
Ppt on ONLINE BOOK STORE
Azure functions
Web server and web-hosting
Data aggregation in wireless sensor network , 11751 d5811
What is NoSQL and CAP Theorem
Netflix Architecture Tutorial at Gluecon
Product catalog using MongoDB
Android Library Management System
Introduction to WAMP, a protocol enabling PUB/SUB and RPC over Websocket
Hadoop & MapReduce
Hash mac algorithms
HTML Basic, CSS Basic, JavaScript basic.
Amazon simple storage service (amazon s3)
6 Data Modeling for NoSQL 2/2
Cloud computing Report
Fundamental Cloud Security
Distributed Coordination-Based Systems
Cloud Based Covid 19 Testing Management System
E commerce use case documentation.
Ppt on ONLINE BOOK STORE

Similar to How to choose the right messaging service for your workload (20)

PDF
How to build a social network on serverless
PDF
BDX 2016- Monal daxini @ Netflix
PDF
Evolution of Microservices - Craft Conference
PDF
Progscon 2017: Serverless Architectures - Rafal Gancarz
PDF
How to build a social network on serverless | Yan Cui
PDF
How to build a social network on Serverless (AWS Community Summit)
PDF
The Netflix Way to deal with Big Data Problems
PDF
How to build a social network on serverless
PDF
AWS Lambda Presentation (Tech Talk DC)
PDF
Apply best parts of microservices to serverless
PDF
Streams and serverless at DAZN
PPTX
Running a Massively Parallel Self-serve Distributed Data System At Scale
PPTX
F_1330_Narkhede_Kafka .pptx
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Apache kafka
PPTX
Apache kafka
How to build a social network on serverless
BDX 2016- Monal daxini @ Netflix
Evolution of Microservices - Craft Conference
Progscon 2017: Serverless Architectures - Rafal Gancarz
How to build a social network on serverless | Yan Cui
How to build a social network on Serverless (AWS Community Summit)
The Netflix Way to deal with Big Data Problems
How to build a social network on serverless
AWS Lambda Presentation (Tech Talk DC)
Apply best parts of microservices to serverless
Streams and serverless at DAZN
Running a Massively Parallel Self-serve Distributed Data System At Scale
F_1330_Narkhede_Kafka .pptx
Apache kafka
Apache kafka
Apache kafka
Apache kafka
Apache kafka
Apache kafka
Apache kafka

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
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
A Presentation on Artificial Intelligence
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Encapsulation theory and applications.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
cuic standard and advanced reporting.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
MYSQL Presentation for SQL database connectivity
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
A Presentation on Artificial Intelligence
Dropbox Q2 2025 Financial Results & Investor Presentation
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Review of recent advances in non-invasive hemoglobin estimation
Encapsulation theory and applications.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Monthly Chronicles - July 2025
cuic standard and advanced reporting.pdf
20250228 LYD VKU AI Blended-Learning.pptx
MYSQL Presentation for SQL database connectivity

How to choose the right messaging service for your workload