SlideShare a Scribd company logo
The Good, The Bad
and The Ugly side
of Step Functions
Mohsiur Rahman, Software Engineer at
Comcast
Serverless on Amazon Web Services (AWS)
● Compute Technologies - Lambda,
Lambda@Edge, Fargate
● Databases - DynamoDB, Aurora
Serverless
● API Proxy - API Gateway
● Interprocess Messaging - Simple
Notification Service (SNS), Simple
Queue Service (SQS)
● Analytics - Kinesis
● Orchestration - Step Functions
What is a Step Function?
● Workflows that are made up of a series of
steps, with the output of one step acting as
input into the next
● Allows to build and update apps quickly by
coordinating multiple AWS services into
serverless workflows
● Translates workflow into a state machine
diagram that is easy to understand, easy to
explain to others, and easy to change.
● Identify and fix problems promptly, by
monitoring each execution step,
Source: DAZN Tech
Different States in
Step Functions
● Wait State
● Parallel State
● Retry State
● Catch Failure State
● Choice State
When should you use
Step Functions and
Why?
When N is a known number
● Automation of Tasks run daily
● Batch processing jobs
○ Required 24/7 monitoring.
○ Resulted in costs increasing exponentially.
○ Bugs in AWS Simple Workflow (SWF) that
could not be solved by AWS Support
Engineers.
○ Had over 1000 instances running at its
peak.
○ Loss of documents being processed in a
given SLA i.e impacting business.
● Modernize a monolithic code base as a
series of microservice steps.
By the end of December costs were at ~$4000 with predicted
costs for January being lower.
Impact of using
Step Functions
● Costs went down by 70% within two
months.
● Conversion of existing architecture was
done easily with minimal changes to
codebase.
● Allowed new features to be added during
conversion.
● Time spent by developers monitoring
decreased to less than 10 hours.
● Maintaining stateless codebase.
The benefits of serverless
Why not to use Step
Functions?
When N is
unknown/large
Where n is the number of invocations ● Step Functions charges per transition,
plus Lambda costs.
● Example shows 8 state transitions
● For 1,000,000 invocations the cost would
be
1000 * 8 * 0.0250 = $200 + Lambda costs
● At comcast our case involved receiving
over a million invocations per minute,
resulting in an ~$1400 bill in 2 weeks.
How to still be
serverless without
using Step
Functions
● Lambdas can call another lambda
asynchronously.
● Thus mitigating costs to only Lambda
pricing model.
● Lambda costs equalled to ~500$ per
month compared to Step Functions
running for 2 weeks at ~$1400.
● Lack of visualization is given up in this
process on where it is failing.
● Lambdas are stateful, and requires
frequent code changes if new feature is
added.
Q&A
Social Media
LinkedIn : linkedin.com/in/mohsiur/
GitHub : github.com/mohsiur
Medium : medium.com/@mohsiurr

More Related Content

PDF
Clovaを支える技術 機械学習配信基盤のご紹介
PDF
LINEデリマでのElasticsearchの運用と監視の話
PDF
Serverless microservices in the wild
PPTX
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
PDF
Front End Orlando - AWS Lambda
PDF
Flink Forward Berlin 2018: Krzysztof Zarzycki & Alexey Brodovshuk - "Assistin...
PDF
Cédric Vidal from Quicksign: Building a digital on-boarding microservices pla...
PDF
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Clovaを支える技術 機械学習配信基盤のご紹介
LINEデリマでのElasticsearchの運用と監視の話
Serverless microservices in the wild
Lieven Vandegaer from MEDIAGENIX - Orchestrating a video-on-demand pipeline w...
Front End Orlando - AWS Lambda
Flink Forward Berlin 2018: Krzysztof Zarzycki & Alexey Brodovshuk - "Assistin...
Cédric Vidal from Quicksign: Building a digital on-boarding microservices pla...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...

What's hot (20)

PDF
Kafka used at scale to deliver real-time notifications
PDF
Serverless Apps on Google Cloud: more dev, less ops
PDF
Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...
PPTX
Architecture Sustaining LINE Sticker services
PPT
UC4 SCHEDULING
PPTX
Kafka Practices @ Uber - Seattle Apache Kafka meetup
PPTX
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
PDF
Flink Forward Berlin 2018: Stephan Ewen - Keynote: "Unlocking the next wave o...
PDF
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
PPTX
Autonomous workload rebalancing in kafka
PDF
Automating EVA Workflows with AWS Step Functions
PDF
Metrics driven development with dedicated Observability Team
PPTX
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
KEY
New relic
PDF
Going Microserverless on Google Cloud @ mabl
PPTX
Immutable infrastructure
PDF
A Functional Approach to Architecture - Kafka & Kafka Streams - Kevin Mas Rui...
PDF
Total cloud immersion
PPTX
What Is Light BPT and How Can You Use it for Parallel Processing?
PPTX
Apache Kafka : Monitoring vs Alerting
Kafka used at scale to deliver real-time notifications
Serverless Apps on Google Cloud: more dev, less ops
Flink Forward Berlin 2018: Brian Wolfe - "Upshot: distributed tracing using F...
Architecture Sustaining LINE Sticker services
UC4 SCHEDULING
Kafka Practices @ Uber - Seattle Apache Kafka meetup
Flink Forward Berlin 2018: Aljoscha Krettek & Till Rohrmann - Keynote: "A Yea...
Flink Forward Berlin 2018: Stephan Ewen - Keynote: "Unlocking the next wave o...
Hadoop summit - Scaling Uber’s Real-Time Infra for Trillion Events per Day
Autonomous workload rebalancing in kafka
Automating EVA Workflows with AWS Step Functions
Metrics driven development with dedicated Observability Team
Flink Forward Berlin 2018: Timo Walther - "Flink SQL in Action"
New relic
Going Microserverless on Google Cloud @ mabl
Immutable infrastructure
A Functional Approach to Architecture - Kafka & Kafka Streams - Kevin Mas Rui...
Total cloud immersion
What Is Light BPT and How Can You Use it for Parallel Processing?
Apache Kafka : Monitoring vs Alerting
Ad

Similar to The good, the bad, the ugly side of step functions (20)

PDF
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
PPTX
Serverless Workflows on AWS - A Journey from SWF to Step Functions
PDF
Serverless on AWS: Architectural Patterns and Best Practices
PDF
Step into serverless into the box 2018
PDF
Serverless Apps with AWS Step Functions
PPTX
Serverless
PPTX
Aws steps
PDF
Stepping Up Your DevOps With Step Functions
PDF
Introduction to Serverless through Architectural Patterns
PPTX
Serverless architectures: APIs, Serverless Functions, Microservices - How to ...
PDF
FaaS or not to FaaS AWS Community Day Hamburg 2019 Bannes Kazulkin
PPTX
Serverless without Code (Lambda)
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
PDF
Orchestrating complex workflows with aws step functions
PDF
Serverless computing
PPTX
Primeros pasos en desarrollo serverless
PPTX
Going Serverless on AWS
PPTX
serverless_meetup_Jan_2023_v1.0.pptx
PDF
FaaS or not to FaaS. Visible and invsible benefits of the Serverless paradigm...
PDF
The Best Practices and Hard Lessons Learned of Serverless Applications
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
Serverless Workflows on AWS - A Journey from SWF to Step Functions
Serverless on AWS: Architectural Patterns and Best Practices
Step into serverless into the box 2018
Serverless Apps with AWS Step Functions
Serverless
Aws steps
Stepping Up Your DevOps With Step Functions
Introduction to Serverless through Architectural Patterns
Serverless architectures: APIs, Serverless Functions, Microservices - How to ...
FaaS or not to FaaS AWS Community Day Hamburg 2019 Bannes Kazulkin
Serverless without Code (Lambda)
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Orchestrating complex workflows with aws step functions
Serverless computing
Primeros pasos en desarrollo serverless
Going Serverless on AWS
serverless_meetup_Jan_2023_v1.0.pptx
FaaS or not to FaaS. Visible and invsible benefits of the Serverless paradigm...
The Best Practices and Hard Lessons Learned of Serverless Applications
Ad

Recently uploaded (20)

PDF
PPT on Performance Review to get promotions
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPT
Project quality management in manufacturing
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Digital Logic Computer Design lecture notes
PPTX
Lesson 3_Tessellation.pptx finite Mathematics
PPTX
OOP with Java - Java Introduction (Basics)
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT on Performance Review to get promotions
bas. eng. economics group 4 presentation 1.pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
UNIT-1 - COAL BASED THERMAL POWER PLANTS
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Project quality management in manufacturing
Arduino robotics embedded978-1-4302-3184-4.pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Internet of Things (IOT) - A guide to understanding
UNIT 4 Total Quality Management .pptx
Geodesy 1.pptx...............................................
Foundation to blockchain - A guide to Blockchain Tech
Digital Logic Computer Design lecture notes
Lesson 3_Tessellation.pptx finite Mathematics
OOP with Java - Java Introduction (Basics)
Model Code of Practice - Construction Work - 21102022 .pdf
Embodied AI: Ushering in the Next Era of Intelligent Systems

The good, the bad, the ugly side of step functions

  • 1. The Good, The Bad and The Ugly side of Step Functions Mohsiur Rahman, Software Engineer at Comcast
  • 2. Serverless on Amazon Web Services (AWS) ● Compute Technologies - Lambda, Lambda@Edge, Fargate ● Databases - DynamoDB, Aurora Serverless ● API Proxy - API Gateway ● Interprocess Messaging - Simple Notification Service (SNS), Simple Queue Service (SQS) ● Analytics - Kinesis ● Orchestration - Step Functions
  • 3. What is a Step Function? ● Workflows that are made up of a series of steps, with the output of one step acting as input into the next ● Allows to build and update apps quickly by coordinating multiple AWS services into serverless workflows ● Translates workflow into a state machine diagram that is easy to understand, easy to explain to others, and easy to change. ● Identify and fix problems promptly, by monitoring each execution step, Source: DAZN Tech
  • 4. Different States in Step Functions ● Wait State ● Parallel State ● Retry State ● Catch Failure State ● Choice State
  • 5. When should you use Step Functions and Why?
  • 6. When N is a known number ● Automation of Tasks run daily ● Batch processing jobs ○ Required 24/7 monitoring. ○ Resulted in costs increasing exponentially. ○ Bugs in AWS Simple Workflow (SWF) that could not be solved by AWS Support Engineers. ○ Had over 1000 instances running at its peak. ○ Loss of documents being processed in a given SLA i.e impacting business. ● Modernize a monolithic code base as a series of microservice steps.
  • 7. By the end of December costs were at ~$4000 with predicted costs for January being lower.
  • 8. Impact of using Step Functions ● Costs went down by 70% within two months. ● Conversion of existing architecture was done easily with minimal changes to codebase. ● Allowed new features to be added during conversion. ● Time spent by developers monitoring decreased to less than 10 hours. ● Maintaining stateless codebase. The benefits of serverless
  • 9. Why not to use Step Functions?
  • 10. When N is unknown/large Where n is the number of invocations ● Step Functions charges per transition, plus Lambda costs. ● Example shows 8 state transitions ● For 1,000,000 invocations the cost would be 1000 * 8 * 0.0250 = $200 + Lambda costs ● At comcast our case involved receiving over a million invocations per minute, resulting in an ~$1400 bill in 2 weeks.
  • 11. How to still be serverless without using Step Functions ● Lambdas can call another lambda asynchronously. ● Thus mitigating costs to only Lambda pricing model. ● Lambda costs equalled to ~500$ per month compared to Step Functions running for 2 weeks at ~$1400. ● Lack of visualization is given up in this process on where it is failing. ● Lambdas are stateful, and requires frequent code changes if new feature is added.
  • 12. Q&A Social Media LinkedIn : linkedin.com/in/mohsiur/ GitHub : github.com/mohsiur Medium : medium.com/@mohsiurr

Editor's Notes

  • #4: Show an example of what a Step Function looks like in JSON format https://gist.github.com/mohsiur/c2abf9b1319614878a473cb934a2e120
  • #6: Coordinating multiple AWS Services into serverless workflows. Visual Workflows