SlideShare a Scribd company logo
@SrushithR
@SrushithR
Srushith Repakula
Head of Engineering, KonfHub
AWS Serverless Hero
Lessons Learned from Building a
Serverless Notifications System
@SrushithR
@SrushithR
Srushith Repakula
AWS Serverless Hero
Head of Engineering at KonfHub
Serverless Consultant
AWS UG Tirupati Lead
Co-organiser of Serverless Group
Host of ServerlessSaturdays
@SrushithR
Agenda
1. What did we try to solve?
2. How did we solve it?
3. Why Serverless?
4. Problems, challenges encountered and how we conquered it
5. Unconquered challenges
@SrushithR
● A highly scalable notification system that can deliver notifications to
hundreds of thousands of recipients
● Should work for multiple channels - Email, SMS and WhatsApp
● Should support instant launch and scheduled campaigns
● Handle duplicates
● Real time analytics on deliverability, open, and click rates
What did we try to solve?
@SrushithR
How did we solve it?
Amazon API Gateway Amazon Simple Queue
Service (Amazon SQS)
AWS Lambda
Amazon EventBridge
Amazon Simple Email
Service (Amazon SES)
Amazon Simple Notification
Service (Amazon SNS)
AWS Lambda
Amazon Cognito
Amazon DynamoDB
Amazon Aurora
Webhooks
@SrushithR
AWS Services used
● Amazon API Gateway
● Amazon Cognito
● AWS Lambda
● Amazon DynamoDB
● Amazon SQS
● Amazon Aurora
● Amazon EventBridge
● Amazon SES
● Amazon SNS
@SrushithR
@SrushithR
Problems and Challenges
● Deliverability of emails and domain reputation
● SQS - FIFO queue vs standard queue
● Throttling limits of the notification service providers. For example, number of
emails sent per second and per day
● Scalability, cost and time to finish the campaigns
● Lambda function’s max timeout of 15 minutes
● Scheduling of campaigns every minute
@SrushithR
Deliverability of emails and domain reputation
Dedicated IP
Each consumer uses a dedicated IP
address set for sending emails. For
example, one dedicated IP for
transactional, one for marketing, etc.
Shared IP
Multiple consumers use the same IP
set for sending emails
Pic credit:https://postmarkapp.com/guides/dedicated-vs-shared-ips-for-email-when-to-use-each
@SrushithR
Dedicated IP Addresses for Amazon SES
Standard
Refers to dedicated IP
addresses that you
manually set up and
manage, including the
option to manually warm
them up and scale them
out, and to manually move
them in and out of IP
pools
Managed
Refers to dedicated IP
addresses that are
automatically set up.
SES automatically warm
up for each ISP
individually and
auto-scale based on your
sending volume
Bring your own IP
addresses
Makes it possible to use your
own IP addresses to send
email through SES
Helpful when there is a
positive IP reputation built
using an in-house email
sending system, but want to
migrate to Amazon SES
@SrushithR
SQS - FIFO queue vs standard queue
Pic credit:https://www.bitslovers.com/sqs-fifo/
@SrushithR
SQS - FIFO queue vs standard queue: The case for FIFO
● Handling of duplicates and order
● Easier to understand the status of a campaign
● Unbatched throughput - 300
● Batched transactions per second FIFO - 3000
● Batched transactions per second for high throughput FIFO - 70,000*
● In flight messages per queue - 20,000
@SrushithR
● In flight messages per queue - 120,000
● Faster to process since there is no order to be maintained
● Cheaper in comparison to FIFO
SQS - FIFO queue vs standard queue: The case for Standard
@SrushithR
Although Standard queue increase application
layer complexity like
● Implementation of idempotency
● Extra processing for fetching the campaign
status
etc, Standard was the choice because:
● FIFO has only a 5-minute deduplication
interval
● Slower when hundreds of messages are
published within the same group
SQS - FIFO queue vs standard queue: Standard wins!
@SrushithR
Throttling limits are everywhere!
● Daily sending quota - the maximum number of emails that you can send in a
24-hour period
● Maximum send rate - the maximum number of emails that Amazon SES can
accept from the account each second. One can exceed this quota for short
bursts, but not for sustained periods of time.
Throttling limits of the notification service providers
@SrushithR
Conquering the throttling limits - Reserved Concurrency
● The concurrency limit is reserved just for the lambda function ensuring that there
are execution environments available and not shared with the account level
settings
● The maximum number of execution environment instances
● Throttled when the reserved concurrency limit is reached
@SrushithR
Conquering the throttling limits - Maximum concurrency for SQS
@SrushithR
Scheduling of campaigns every minute
The Challenges:
● Campaigns can be scheduled to the minute
● Scalability of the scheduler service - hundreds and thousands of
campaigns can be scheduled
@SrushithR
Scheduling of campaigns every minute
The Challenges:
● Campaigns can be scheduled to the minute
● Scalability of the scheduler service - hundreds and thousands of campaigns
can be scheduled
Common solution - run a cron job every minute to pick up campaigns that
are scheduled
Problems with this solution:
● Unnecessary costs involved in empty Lambda function invocations
● Increases application complexity
@SrushithR
Scheduling of campaigns every minute
@SrushithR
Unconquered Challenges
● Automated end-to-end testing of the entire architecture
● Observability and monitoring
● Automatic handling of service provider limits for “Bring your own provider”
use case
@SrushithR
Thank you!
https://www.linkedin.com/in/srushith/
@SrushithR

More Related Content

PDF
Lessons Learned from Building a Serverless Notifications System by Srushith R...
PDF
Application Integration Patterns (not only) for Microservices
PDF
Message-Driven Architecture on AWS
PDF
AWS Application Services Lambda, SES, SNS, SQS, SWF
PPT
2011210seslaunchwebinar 110220233455 Phpapp02
PPTX
AWS SQS SNS
PPTX
AWS Serverless Introduction
PPTX
AWS Serverless Introduction
Lessons Learned from Building a Serverless Notifications System by Srushith R...
Application Integration Patterns (not only) for Microservices
Message-Driven Architecture on AWS
AWS Application Services Lambda, SES, SNS, SQS, SWF
2011210seslaunchwebinar 110220233455 Phpapp02
AWS SQS SNS
AWS Serverless Introduction
AWS Serverless Introduction

Similar to Lessons Learned from Building a Serverless Notifications System.pdf (20)

PPTX
Amazon Simple Email Service
PPTX
Picking a message queue
PPTX
Chat room with smart mailing system
PPTX
AWS Serverless key services
PDF
Serverless Computing with AWS
PDF
RabbitMQ Status Quo Critical Review
PDF
Sqs and loose coupling
PDF
Experiences in Architecting & Implementing Platforms using Serverless.pdf
PDF
Serverless — it all started in Vegas
POTX
Serverless: State of The Union I AWS Dev Day 2018
PPTX
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
PPTX
Lecture- Loosely Coupled Cloud Native Architectures-- (1).pptx
PPTX
Amazon_SES.pptx
PPTX
Amazon SQS overview
PDF
PyConIT 2018 Writing and deploying serverless python applications
PDF
GOTO Stockholm - AWS Lambda - Logic in the cloud without a back-end
PDF
Which messaging layer to use in a loosely coupled distributed app (no speaker...
PPTX
AWS Messaging
PDF
Writing and deploying serverless python applications
PPTX
Open Source Versions of Amazon's SNS and SQS.pptx
Amazon Simple Email Service
Picking a message queue
Chat room with smart mailing system
AWS Serverless key services
Serverless Computing with AWS
RabbitMQ Status Quo Critical Review
Sqs and loose coupling
Experiences in Architecting & Implementing Platforms using Serverless.pdf
Serverless — it all started in Vegas
Serverless: State of The Union I AWS Dev Day 2018
Serverless Streams, Topics, Queues, & APIs! Pick the Right Serverless Applica...
Lecture- Loosely Coupled Cloud Native Architectures-- (1).pptx
Amazon_SES.pptx
Amazon SQS overview
PyConIT 2018 Writing and deploying serverless python applications
GOTO Stockholm - AWS Lambda - Logic in the cloud without a back-end
Which messaging layer to use in a loosely coupled distributed app (no speaker...
AWS Messaging
Writing and deploying serverless python applications
Open Source Versions of Amazon's SNS and SQS.pptx
Ad

More from Srushith Repakula (16)

PDF
Building an AI-Powered Photo Gallery with Serverless and Event-Driven Magic!
PDF
How we scaled to 80K users by doing nothing!.pdf
PDF
Serverless - Your Gateway to the Cloud!
PDF
Serverless: Beyond Lambda Functions (V2)
PDF
Getting Started with Amazon EventBridge
PDF
CICD in the World of Serverless
PDF
Real Time Serverless Polling App
PPTX
Serverless Workshop - Tomato Restaurant Rating App
PPTX
Become Thanos of the LambdaLand: Wield all the Infinity Stones
PPTX
Serverless by Examples and Case Studies
PPTX
Lambda land: Running a serverless ticketing platform for less than $2 a month
PDF
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
PPTX
Chatbots with Serverless
PPTX
Keep Calm and Code Python - Build Cool Stuff Uing Python
PPTX
Serverless: Why is it hot and What is it not?
PPTX
Scheduled Retweets Using AWS Lambda
Building an AI-Powered Photo Gallery with Serverless and Event-Driven Magic!
How we scaled to 80K users by doing nothing!.pdf
Serverless - Your Gateway to the Cloud!
Serverless: Beyond Lambda Functions (V2)
Getting Started with Amazon EventBridge
CICD in the World of Serverless
Real Time Serverless Polling App
Serverless Workshop - Tomato Restaurant Rating App
Become Thanos of the LambdaLand: Wield all the Infinity Stones
Serverless by Examples and Case Studies
Lambda land: Running a serverless ticketing platform for less than $2 a month
AWS Lambda Hands-on: How to Create Phone Call Notifications in a Serverless Way
Chatbots with Serverless
Keep Calm and Code Python - Build Cool Stuff Uing Python
Serverless: Why is it hot and What is it not?
Scheduled Retweets Using AWS Lambda
Ad

Recently uploaded (20)

PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
Introduction to Artificial Intelligence
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
top salesforce developer skills in 2025.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Introduction to Artificial Intelligence
L1 - Introduction to python Backend.pptx
Operating system designcfffgfgggggggvggggggggg
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Odoo POS Development Services by CandidRoot Solutions
Softaken Excel to vCard Converter Software.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Understanding Forklifts - TECH EHS Solution
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Odoo Companies in India – Driving Business Transformation.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Navsoft: AI-Powered Business Solutions & Custom Software Development
top salesforce developer skills in 2025.pdf

Lessons Learned from Building a Serverless Notifications System.pdf

  • 1. @SrushithR @SrushithR Srushith Repakula Head of Engineering, KonfHub AWS Serverless Hero Lessons Learned from Building a Serverless Notifications System
  • 2. @SrushithR @SrushithR Srushith Repakula AWS Serverless Hero Head of Engineering at KonfHub Serverless Consultant AWS UG Tirupati Lead Co-organiser of Serverless Group Host of ServerlessSaturdays
  • 3. @SrushithR Agenda 1. What did we try to solve? 2. How did we solve it? 3. Why Serverless? 4. Problems, challenges encountered and how we conquered it 5. Unconquered challenges
  • 4. @SrushithR ● A highly scalable notification system that can deliver notifications to hundreds of thousands of recipients ● Should work for multiple channels - Email, SMS and WhatsApp ● Should support instant launch and scheduled campaigns ● Handle duplicates ● Real time analytics on deliverability, open, and click rates What did we try to solve?
  • 5. @SrushithR How did we solve it? Amazon API Gateway Amazon Simple Queue Service (Amazon SQS) AWS Lambda Amazon EventBridge Amazon Simple Email Service (Amazon SES) Amazon Simple Notification Service (Amazon SNS) AWS Lambda Amazon Cognito Amazon DynamoDB Amazon Aurora Webhooks
  • 6. @SrushithR AWS Services used ● Amazon API Gateway ● Amazon Cognito ● AWS Lambda ● Amazon DynamoDB ● Amazon SQS ● Amazon Aurora ● Amazon EventBridge ● Amazon SES ● Amazon SNS
  • 8. @SrushithR Problems and Challenges ● Deliverability of emails and domain reputation ● SQS - FIFO queue vs standard queue ● Throttling limits of the notification service providers. For example, number of emails sent per second and per day ● Scalability, cost and time to finish the campaigns ● Lambda function’s max timeout of 15 minutes ● Scheduling of campaigns every minute
  • 9. @SrushithR Deliverability of emails and domain reputation Dedicated IP Each consumer uses a dedicated IP address set for sending emails. For example, one dedicated IP for transactional, one for marketing, etc. Shared IP Multiple consumers use the same IP set for sending emails Pic credit:https://postmarkapp.com/guides/dedicated-vs-shared-ips-for-email-when-to-use-each
  • 10. @SrushithR Dedicated IP Addresses for Amazon SES Standard Refers to dedicated IP addresses that you manually set up and manage, including the option to manually warm them up and scale them out, and to manually move them in and out of IP pools Managed Refers to dedicated IP addresses that are automatically set up. SES automatically warm up for each ISP individually and auto-scale based on your sending volume Bring your own IP addresses Makes it possible to use your own IP addresses to send email through SES Helpful when there is a positive IP reputation built using an in-house email sending system, but want to migrate to Amazon SES
  • 11. @SrushithR SQS - FIFO queue vs standard queue Pic credit:https://www.bitslovers.com/sqs-fifo/
  • 12. @SrushithR SQS - FIFO queue vs standard queue: The case for FIFO ● Handling of duplicates and order ● Easier to understand the status of a campaign ● Unbatched throughput - 300 ● Batched transactions per second FIFO - 3000 ● Batched transactions per second for high throughput FIFO - 70,000* ● In flight messages per queue - 20,000
  • 13. @SrushithR ● In flight messages per queue - 120,000 ● Faster to process since there is no order to be maintained ● Cheaper in comparison to FIFO SQS - FIFO queue vs standard queue: The case for Standard
  • 14. @SrushithR Although Standard queue increase application layer complexity like ● Implementation of idempotency ● Extra processing for fetching the campaign status etc, Standard was the choice because: ● FIFO has only a 5-minute deduplication interval ● Slower when hundreds of messages are published within the same group SQS - FIFO queue vs standard queue: Standard wins!
  • 15. @SrushithR Throttling limits are everywhere! ● Daily sending quota - the maximum number of emails that you can send in a 24-hour period ● Maximum send rate - the maximum number of emails that Amazon SES can accept from the account each second. One can exceed this quota for short bursts, but not for sustained periods of time. Throttling limits of the notification service providers
  • 16. @SrushithR Conquering the throttling limits - Reserved Concurrency ● The concurrency limit is reserved just for the lambda function ensuring that there are execution environments available and not shared with the account level settings ● The maximum number of execution environment instances ● Throttled when the reserved concurrency limit is reached
  • 17. @SrushithR Conquering the throttling limits - Maximum concurrency for SQS
  • 18. @SrushithR Scheduling of campaigns every minute The Challenges: ● Campaigns can be scheduled to the minute ● Scalability of the scheduler service - hundreds and thousands of campaigns can be scheduled
  • 19. @SrushithR Scheduling of campaigns every minute The Challenges: ● Campaigns can be scheduled to the minute ● Scalability of the scheduler service - hundreds and thousands of campaigns can be scheduled Common solution - run a cron job every minute to pick up campaigns that are scheduled Problems with this solution: ● Unnecessary costs involved in empty Lambda function invocations ● Increases application complexity
  • 21. @SrushithR Unconquered Challenges ● Automated end-to-end testing of the entire architecture ● Observability and monitoring ● Automatic handling of service provider limits for “Bring your own provider” use case