Refactoring to serverless

AWS User Group Bengaluru
AWS User Group BengaluruAWS User Group Bengaluru
Refactoring to Serverless Translating
common application architecture patterns to
serverless on AWS
Adithya Reddy & Prashanth HN
Adithya Reddy
Who Are We?
@TheTallpants
github.com/tallpants
SDE, Branch Insurance
Prashanth HN
@prashanth
github.com/hnprashanth
CTO, WheelsBox
Source: AWS
• External / Centralized Configuration
• Circuit Breakers & Retries
• Real time / web-sockets
• Asynchronous background tasks
Just Another Serverless talk?
Hell No!
Circuit Breakers &
Retries
What’s a Circuit Breaker?
Circuit breaker is a design pattern used in modern
software development. It is used to detect failures
and encapsulates the logic of preventing a failure
from constantly recurring, during maintenance,
temporary external system failure or unexpected
system difficulties
Circuit Breakers
• Allow systems to "open" the circuit when constant failures
happen repeatedly giving immediate failure responses
instead of loading the system. It can later try "half open"
and see if the system is functioning fine now and "close" in
case things are back to normal, making it self-healing.
• Allow us to contain failures and stop them from creating a
cascading effect of other parts.
Circuit Breaker Using Lambda
Source: https://www.jeremydaly.com/serverless-microservice-patterns-for-aws/
Circuit Breaker Using Step Functions
Source: https://tech.trivago.com/2019/04/09/circuit-breaker-with-aws-step-functions/
External / Centralized
Configuration
Refactoring to serverless
Configuration is immutable for each
published version
1.
2.
Config Servers
Source: gocd.org
• Refresh config values while your app is still running.
• Your app can choose when to refetch configuration
• Per request
• Time-based refetch
• Etc.
SSM Parameter Store
Refactoring to serverless
• Secure hierarchical storage for configuration and secrets
• Store as plain text / KMS encrypted strings
• Reference by unique name
• Version history, access control at key / hierarchy level
• Configurable on-change triggers via CloudWatch Events
• CloudWatch + CloudTrail
• Reference-able asTerraform data source (and CloudFormation – but only
specific versions of keys)
• Generous free limits (1000TPS free, $0.05 per 10,000TPS)
Hierarchical configuration
Access Control
Standard
ABAC /Tag based
Refactoring to serverless
Refactoring to serverless
github.com/tallpants/ssm-parameter-store
Safer, nicer abstraction over SSM parameter store with built-in caching, idempotent
preloading, TypeScript compile time checks, and handy autocompletion
Refactoring to serverless
Asynchronous
BackgroundTasks
Limitations of Lambda
• Resource limitations of Lambda: storage etc
• Lambdas will timeout after 15 minutes
• Limitations in tech stack & stack customisation
Amazon ECS
AWS Fargate
Example Architecture – Resize image to multiple
sizes
Advantages
• SQS can be integrated with almost any kind of service
allowing wide set of triggers
• Auto-scale without hassle
• No infrastructure to manage
• Per second billing (min 1 minute) for the resources used,
vCPU & memory
• Easy to handle failures and retries
RealTime / Web-
Sockets
Refactoring to serverless
Source: AWS
API Gateway
Websocket
Endpoint URL
wss://… connectionId connectionId
API Gateway
Websocket
Endpoint URL
4. Body sent
to client
3. HTTP POST to
/connectionId
2. Get active
connectionIds
1. Score
update
event
wss://…
Refactoring to serverless
Refactoring to serverless
Questions?
Adithya Reddy
Who Are We?
@TheTallpants
github.com/tallpants
SDE, Branch Insurance
Prashanth HN
@prashanth
github.com/hnprashanth
CTO, WheelsBox
1 of 39

Recommended

Modern Cloud Fundamentals: Misconceptions and Industry Trends by
Modern Cloud Fundamentals: Misconceptions and Industry TrendsModern Cloud Fundamentals: Misconceptions and Industry Trends
Modern Cloud Fundamentals: Misconceptions and Industry TrendsChristopher Bennage
1.3K views21 slides
Aws 12 Month Free Tier for Web Designers and Developers by
Aws 12 Month Free Tier for Web Designers and DevelopersAws 12 Month Free Tier for Web Designers and Developers
Aws 12 Month Free Tier for Web Designers and DevelopersDylan Burris
668 views31 slides
How to Build High Performance : WordPress by
How to Build High Performance : WordPressHow to Build High Performance : WordPress
How to Build High Performance : WordPressDylan Burris
541 views68 slides
Modernizing your AWS Deployment - January 2017 by
Modernizing your AWS Deployment - January 2017Modernizing your AWS Deployment - January 2017
Modernizing your AWS Deployment - January 2017CloudHesive
131 views16 slides
The Matrix and DataStax by
The Matrix and DataStaxThe Matrix and DataStax
The Matrix and DataStaxDataStax
1.6K views30 slides
Store by
StoreStore
StoreESUG
376 views19 slides

More Related Content

What's hot

Meetup #3: Migrate a fast scale system to AWS by
Meetup #3: Migrate a fast scale system to AWSMeetup #3: Migrate a fast scale system to AWS
Meetup #3: Migrate a fast scale system to AWSAWS Vietnam Community
233 views42 slides
Aws landing zone. journey to the cloud by
Aws landing zone. journey to the cloudAws landing zone. journey to the cloud
Aws landing zone. journey to the cloudЕкатерина Задорожная
105 views26 slides
Apache Cassandra Management by
Apache Cassandra ManagementApache Cassandra Management
Apache Cassandra ManagementInstaclustr
349 views9 slides
Introduction to Apache Cassandra by
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache CassandraInstaclustr
817 views25 slides
Modernizing DevOps by
Modernizing DevOpsModernizing DevOps
Modernizing DevOpsCloudHesive
107 views20 slides
Shipping logs to splunk from a container in aws howto by
Shipping logs to splunk from a container in aws howtoShipping logs to splunk from a container in aws howto
Shipping logs to splunk from a container in aws howtoЕкатерина Задорожная
352 views17 slides

What's hot(18)

Apache Cassandra Management by Instaclustr
Apache Cassandra ManagementApache Cassandra Management
Apache Cassandra Management
Instaclustr349 views
Introduction to Apache Cassandra by Instaclustr
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
Instaclustr817 views
Modernizing DevOps by CloudHesive
Modernizing DevOpsModernizing DevOps
Modernizing DevOps
CloudHesive107 views
Building & Testing Scalable Rails Applications by evilmike
Building & Testing Scalable Rails ApplicationsBuilding & Testing Scalable Rails Applications
Building & Testing Scalable Rails Applications
evilmike1.5K views
From Grid to Cloud by gojkoadzic
From Grid to CloudFrom Grid to Cloud
From Grid to Cloud
gojkoadzic1.3K views
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS by WSO2
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaSWSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2Con Asia 2014 - Essential Elements of an Enterprise PaaS
WSO2559 views
Evolution of server environments by vpetersson
Evolution of server environmentsEvolution of server environments
Evolution of server environments
vpetersson536 views
Using Redgate, AKS and Azure to bring DevOps to your Database by Red Gate Software
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software184 views
Cassandra Bootstrap from Backups by Instaclustr
Cassandra Bootstrap from BackupsCassandra Bootstrap from Backups
Cassandra Bootstrap from Backups
Instaclustr685 views
Using flash on the server side by Howard Marks
Using flash on the server sideUsing flash on the server side
Using flash on the server side
Howard Marks1.4K views
Server Monitoring (Scaling while bootstrapped) by Ajibola Aiyedogbon
Server Monitoring  (Scaling while bootstrapped)Server Monitoring  (Scaling while bootstrapped)
Server Monitoring (Scaling while bootstrapped)
Ajibola Aiyedogbon334 views
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr... by HostedbyConfluent
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
Kafka for Microservices – You absolutely need Avro Schemas! | Gerardo Gutierr...
HostedbyConfluent660 views
Private cloud cloud-phoenix-april-2014 by Miguel Zuniga
Private cloud cloud-phoenix-april-2014Private cloud cloud-phoenix-april-2014
Private cloud cloud-phoenix-april-2014
Miguel Zuniga655 views
What are clouds made from by John Garbutt
What are clouds made fromWhat are clouds made from
What are clouds made from
John Garbutt806 views
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle... by HostedbyConfluent
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
Using Kafka as a Database For Real-Time Transaction Processing | Chad Preisle...
HostedbyConfluent787 views

Similar to Refactoring to serverless

AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202) by
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)Amazon Web Services
2.1K views37 slides
NDev Talk - Serverless Design Patterns by
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design PatternsRyan Green
58 views27 slides
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks by
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksAmazon Web Services
5.9K views30 slides
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven... by
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...Amazon Web Services
9.7K views53 slides
Deep Dive: AWS CloudHSM (Classic) by
Deep Dive: AWS CloudHSM (Classic)Deep Dive: AWS CloudHSM (Classic)
Deep Dive: AWS CloudHSM (Classic)Amazon Web Services
7.9K views39 slides
Building Serverless Web Applications - DevDay Austin 2017 by
Building Serverless Web Applications - DevDay Austin 2017Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017Amazon Web Services
313 views47 slides

Similar to Refactoring to serverless(20)

AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202) by Amazon Web Services
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
AWS re:Invent 2016: Accenture Cloud Platform Serverless Journey (ARC202)
Amazon Web Services2.1K views
NDev Talk - Serverless Design Patterns by Ryan Green
NDev Talk - Serverless Design PatternsNDev Talk - Serverless Design Patterns
NDev Talk - Serverless Design Patterns
Ryan Green58 views
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks by Amazon Web Services
Deep Dive on AWS Lambda - January 2017 AWS Online Tech TalksDeep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Deep Dive on AWS Lambda - January 2017 AWS Online Tech Talks
Amazon Web Services5.9K views
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven... by Amazon Web Services
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
ARC205 Building Web-scale Applications Architectures with AWS - AWS re: Inven...
Amazon Web Services9.7K views
Building Serverless Web Applications - DevDay Austin 2017 by Amazon Web Services
Building Serverless Web Applications - DevDay Austin 2017Building Serverless Web Applications - DevDay Austin 2017
Building Serverless Web Applications - DevDay Austin 2017
Cloud Lambda Architecture Patterns by Asis Mohanty
Cloud Lambda Architecture PatternsCloud Lambda Architecture Patterns
Cloud Lambda Architecture Patterns
Asis Mohanty121 views
Migrating enterprise workloads to AWS by Tom Laszewski
Migrating enterprise workloads to AWSMigrating enterprise workloads to AWS
Migrating enterprise workloads to AWS
Tom Laszewski10.8K views
Building Serverless Web Applications - DevDay Los Angeles 2017 by Amazon Web Services
Building Serverless Web Applications - DevDay Los Angeles 2017Building Serverless Web Applications - DevDay Los Angeles 2017
Building Serverless Web Applications - DevDay Los Angeles 2017
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven... by Amazon Web Services
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...
How Netflix’s Tools Can Help Accelerate Your Start-up (SVC202) | AWS re:Inven...
Amazon Web Services4.3K views
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ... by Amazon Web Services
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Cloud-Native DevOps: Simplifying application lifecycle management with AWS | ...
Amazon Web Services1.4K views
Getting Started with AWS Lambda and the Serverless Cloud by Amazon Web Services
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Serverless design considerations for Cloud Native workloads by Tensult
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
Tensult92 views
Communication between cloud services by Roi Ezra
Communication between cloud servicesCommunication between cloud services
Communication between cloud services
Roi Ezra79 views
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40... by Amazon Web Services
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Using AWS to Build a Scalable Big Data Management & Processing Service (BDT40...
Amazon Web Services2.3K views
Integrating Microservices with Apache Camel by Christian Posta
Integrating Microservices with Apache CamelIntegrating Microservices with Apache Camel
Integrating Microservices with Apache Camel
Christian Posta10.7K views
PHP LAMP AWS RightSscale by maxgribov
PHP LAMP AWS RightSscalePHP LAMP AWS RightSscale
PHP LAMP AWS RightSscale
maxgribov1.8K views

More from AWS User Group Bengaluru

Demystifying identity on AWS by
Demystifying identity on AWSDemystifying identity on AWS
Demystifying identity on AWSAWS User Group Bengaluru
440 views108 slides
AWS Secrets for Best Practices by
AWS Secrets for Best PracticesAWS Secrets for Best Practices
AWS Secrets for Best PracticesAWS User Group Bengaluru
931 views21 slides
Cloud Security by
Cloud SecurityCloud Security
Cloud SecurityAWS User Group Bengaluru
1.9K views133 slides
Lessons learnt building a Distributed Linked List on S3 by
Lessons learnt building a Distributed Linked List on S3Lessons learnt building a Distributed Linked List on S3
Lessons learnt building a Distributed Linked List on S3AWS User Group Bengaluru
312 views27 slides
Medlife journey with AWS by
Medlife journey with AWSMedlife journey with AWS
Medlife journey with AWSAWS User Group Bengaluru
336 views17 slides
Building Efficient, Scalable and Resilient Front-end logging service with AWS by
Building Efficient, Scalable and Resilient Front-end logging service with AWSBuilding Efficient, Scalable and Resilient Front-end logging service with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWSAWS User Group Bengaluru
443 views33 slides

More from AWS User Group Bengaluru(20)

Building Efficient, Scalable and Resilient Front-end logging service with AWS by AWS User Group Bengaluru
Building Efficient, Scalable and Resilient Front-end logging service with AWSBuilding Efficient, Scalable and Resilient Front-end logging service with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWS by AWS User Group Bengaluru
Building Efficient, Scalable and Resilient Front-end logging service with AWSBuilding Efficient, Scalable and Resilient Front-end logging service with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Keynote - Chaos Engineering: Why breaking things should be practiced by AWS User Group Bengaluru
Keynote - Chaos Engineering: Why breaking things should be practicedKeynote - Chaos Engineering: Why breaking things should be practiced
Keynote - Chaos Engineering: Why breaking things should be practiced

Recently uploaded

Zero to Automated in Under a Year by
Zero to Automated in Under a YearZero to Automated in Under a Year
Zero to Automated in Under a YearNetwork Automation Forum
22 views23 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
139 views17 slides
20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
45 views73 slides
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...James Anderson
126 views32 slides
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism UniverseSimone Puorto
13 views61 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
32 views45 slides

Recently uploaded(20)

PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson126 views
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe by Simone Puorto
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
2024: A Travel Odyssey The Role of Generative AI in the Tourism Universe
Simone Puorto13 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2218 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc72 views
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn26 views
The Forbidden VPN Secrets.pdf by Mariam Shaba
The Forbidden VPN Secrets.pdfThe Forbidden VPN Secrets.pdf
The Forbidden VPN Secrets.pdf
Mariam Shaba20 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10345 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 views

Refactoring to serverless