FaaS or not to FaaS
Visible and invisible benefits of the
Serverless paradigm
Vadym Kazulkin, ip.labs, AWS User Groups Russia and Ukraine, 4 March 2021
Contact
Vadym Kazulkin
ip.labs Bonn, Germany
Co-Organizer: Java User Group Bonn and
Serverless Bonn Meetup
v.kazulkin@gmail.com
@VKazulkin
https://www.linkedin.com/in/vadymkazulkin/
https://www.iplabs.de/
ip.labs
https://www.iplabs.de/
The Value Proposition of
Serverless
Let’s talk about of Total Cost of
Ownership of the Serverless paradigm
Total Cost of Ownership of the Serverless paradigm
No Infrastructure
Operation and
Maintenance
Auto Scaling and
Fault Tolerance
Built in
Own less, build
more
Lower technical
debt
Faster Time to
Market
Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless
Focus on Business
Value and Innovation
Serverless...
…or not to Serverless ?
Image: https://stock.adobe.com
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Decision Checklist : understand your…
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand
Application
lifecycle
Christian Posta „Be as serverless as you can, but not more than that” https://blog.christianposta.com/serverless/its-not-about-microservices-vs-serverless/
Explore phase
• Quickly validate
hypotheses
• Rapidly experiment
• Run experiments as
cheaply as possible
Serverless is a perfect fit
Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea Vadym Kazulkin @VKazulkin , ip.labs GmbH
Exploit phase
• Built something that does
provide customer value
• Build it on scale
• Build a profitable product
around it
partly serverless and partly not
serverless architecture
Image: Robert Scoble via Flickr Vadym Kazulkin @VKazulkin , ip.labs GmbH
Application lifecycle
• How much of my stack should I own
to be able to deliver business value?
• What should I outsource to my
service provider : SLA, regulatory
compliance, price, and roadmap?
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Existing
applications
• You can’t magically move
them to the cloud providers
(especially make your
application Serverless)
• You can try to modernize
parts of them
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Strangler
Pattern
• Add a proxy (API
Gateway or Application
Loadbalancer), which
sits between the legacy
application and the user
• Add new services and
link it to the proxy
Marin Fowler „StrangerFigApplication” https://martinfowler.com/bliki/StranglerFigApplication.html Vadym Kazulkin @VKazulkin , ip.labs GmbH
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand your
workloads
• Event-driven
• API-driven
• Batch Job
• Internal Tool
• ML/AI
• Big Data
Image: flickr.com/photos/everywhereatonce/294789504 Vadym Kazulkin @VKazulkin , ip.labs GmbH
Lambda Layers
& Lambda
Runtime API
Door opener for use
cases like:
• Big Data
• ML/AI
Vadym Kazulkin @VKazulkin , ip.labs GmbH
A Shared File System
for Your Lambda
Functions
Door opener for use
case like:
• ML/AI
Understand your workloads
• Do we need to access specialized
hardware ?
• GPU access required?
• Another RAM/CPU ratio?
• Do we need constantly high
performance?
• Response time below 100 ms
(bidding or gaming platforms)
“A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
Understand your workloads
• Do we need high throughput ?
• Lambda‘s network bandwidth is limited
(an order of magnitude lower than a
single modern SSD) shared between all
functions packed on the same VM
• Do functions need to communicate with
each other?
• functions are not directly network
accessible, they must communicate via
an intermediary service
“A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand platform
limitations
• Cold start
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand Service
Quotas 1/2
• Max parallel executions of all
Lambdas in each AWS Account per
Region
• Soft limit of 500-3000 parallel
• API Gateway throttle limit
• 1000 requests per second
• Invocation duration & timeouts
• Lambda 15min
• API Gateway integration 29sec
Vadym Kazulkin @VKazulkin , ip.labs GmbH
James Beswick: Operating Lambda: Application design and Service Quotas
https://aws.amazon.com/blogs/compute/operating-lambda-application-design-and-service-quotas-part-1/
Understand Service
Quotas 2/2
• Payload limit
• API Gateway 10 Mb
• Lambda 6 Mb
• SQS 256 Kb
• Max Memory assigned to Lambda
• 10GB
Vadym Kazulkin @VKazulkin , ip.labs GmbH
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Vadym Kazulkin @VKazulkin , ip.labs GmbH
The reality is…
Lambda is often just a
small percentage
of your total cost
Vadym Kazulkin, @VKazulkin
Understand your cost at scale
• Lambda
• API Gateway
• Dynamo DB capacity choices
• Event Sources (SQS, SNS,
EventBridge, Kinesis)
• Step functions
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand your cost at scale
• Logging costs (AWS CloudWatch Logs)
• Monitoring costs (AWS CloudWatch)
• Tracing (AWS X-Ray)
• Remote API calls / 3rd party services
price models
Vadym Kazulkin @VKazulkin , ip.labs GmbH
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Understand organizational
environment (structure,
reponsibilities, knowledge,
culture)
• Do you already embrace
DevOps best practices?
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Tom McLaughlin Talk:
What do we do when
the server goes away?
• Observability (Logging,
Monitoring, Tracing, & Alerting
• Chaos Engineering & Game Days
• Help understand constraints
of AWS services & choose the right
one
Tom McLaughlin „What do we do when the server goes away”
https://speakerdeck.com/tmclaugh/serverless-devops-what-do-we-do-when-the-server-goes-away
Charity Majors „The Future of Ops Careers” https://thenewstack.io/the-future-of-ops-careers Vadym Kazulkin @VKazulkin , ip.labs GmbH
Help understand constraints of AWS services &
choose the right one. Example Event Sources:
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Co-evolution of practices with
Serverless 1/2
• True DevOps
• Complete infrastructure automation
• Chaos Engineering
• FinDev responsibilities in the teams
Sheen Brisals “Why the ‘WHY’ matters more than the ‘WHAT’ in Serverless!”
https://medium.com/lego-engineering/why-the-why-matters-more-than-the-what-in-serverless-2ef56c397962
DevOps Topologies: https://web.devopstopologies.com/
Co-evolution of practices with
Serverless 2/2
• Each team or even developer can have its
own (AWS test) account per feature or service
• Only minimal local testing (quick functional
tests)
• Adopt “testing in production”
Michael Bryzek “What do you know about testing in production?” https://www.youtube.com/watch?v=z-ATZTUgaAo
1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Organizational environment
6. Platform and tooling maturity
Vadym Kazulkin @VKazulkin , ip.labs GmbH
Serverless platform and tooling maturity
• Infrastructure-as-a-Code
solutions maturity
• with AWS Cloud Formation, AWS CDK
• Development environment &
framework maturity
• with AWS SAM, AWS Amplify and
Serverless Framework
Image: http://tea.solgenomics.net/anatomy_viewer/microscopy/slm82_fruit Vadym Kazulkin @VKazulkin , ip.labs GmbH
Serverless platform and tooling maturity
• CI/CD
• with AWS CodeCommit, CodeBuild,
CodePipeline and CodeDeploy
• Observability (Logging,
Monitoring, Tracing, Alerting)
• with AWS CloudWatch and X-Ray
• Integration with 3rd party SaaS
• with AWS Lambda Extensions (Epsagon,
HashiCorp, Lumigo, Thundra, Datadog)
• with AWS EvenBridge (PagerDuty,
Zendesk, Shopify, Datadog)
Image: http://tea.solgenomics.net/anatomy_viewer/microscopy/slm82_fruit
AWS Lambda Extensions https://aws.amazon.com/de/about-aws/whats-new/2020/10/aws-lambda-extensions-integrate-operational-tools/
Vadym Kazulkin @VKazulkin , ip.labs GmbH
www.iplabs.de
Thank You!
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradigm at AWS User Group Russia and Ukraine

FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradigm at AWS User Group Russia and Ukraine

  • 1.
    FaaS or notto FaaS Visible and invisible benefits of the Serverless paradigm Vadym Kazulkin, ip.labs, AWS User Groups Russia and Ukraine, 4 March 2021
  • 2.
    Contact Vadym Kazulkin ip.labs Bonn,Germany Co-Organizer: Java User Group Bonn and Serverless Bonn Meetup v.kazulkin@gmail.com @VKazulkin https://www.linkedin.com/in/vadymkazulkin/ https://www.iplabs.de/
  • 3.
  • 4.
    The Value Propositionof Serverless Let’s talk about of Total Cost of Ownership of the Serverless paradigm
  • 5.
    Total Cost ofOwnership of the Serverless paradigm No Infrastructure Operation and Maintenance Auto Scaling and Fault Tolerance Built in Own less, build more Lower technical debt Faster Time to Market Forrest Brazeal „The Business Case For Serverless” https://www.trek10.com/blog/business-case-for-serverless Focus on Business Value and Innovation
  • 6.
  • 7.
  • 8.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Decision Checklist : understand your… Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 9.
    Understand Application lifecycle Christian Posta „Beas serverless as you can, but not more than that” https://blog.christianposta.com/serverless/its-not-about-microservices-vs-serverless/
  • 10.
    Explore phase • Quicklyvalidate hypotheses • Rapidly experiment • Run experiments as cheaply as possible Serverless is a perfect fit Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 11.
    Exploit phase • Builtsomething that does provide customer value • Build it on scale • Build a profitable product around it partly serverless and partly not serverless architecture Image: Robert Scoble via Flickr Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 12.
    Application lifecycle • Howmuch of my stack should I own to be able to deliver business value? • What should I outsource to my service provider : SLA, regulatory compliance, price, and roadmap? Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 13.
    Existing applications • You can’tmagically move them to the cloud providers (especially make your application Serverless) • You can try to modernize parts of them Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 14.
    Strangler Pattern • Add aproxy (API Gateway or Application Loadbalancer), which sits between the legacy application and the user • Add new services and link it to the proxy Marin Fowler „StrangerFigApplication” https://martinfowler.com/bliki/StranglerFigApplication.html Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 15.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 16.
    Understand your workloads • Event-driven •API-driven • Batch Job • Internal Tool • ML/AI • Big Data Image: flickr.com/photos/everywhereatonce/294789504 Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 17.
    Lambda Layers & Lambda RuntimeAPI Door opener for use cases like: • Big Data • ML/AI Vadym Kazulkin @VKazulkin , ip.labs GmbH A Shared File System for Your Lambda Functions Door opener for use case like: • ML/AI
  • 18.
    Understand your workloads •Do we need to access specialized hardware ? • GPU access required? • Another RAM/CPU ratio? • Do we need constantly high performance? • Response time below 100 ms (bidding or gaming platforms) “A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
  • 19.
    Understand your workloads •Do we need high throughput ? • Lambda‘s network bandwidth is limited (an order of magnitude lower than a single modern SSD) shared between all functions packed on the same VM • Do functions need to communicate with each other? • functions are not directly network accessible, they must communicate via an intermediary service “A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
  • 20.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 21.
    Understand platform limitations • Coldstart Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 22.
    Understand Service Quotas 1/2 •Max parallel executions of all Lambdas in each AWS Account per Region • Soft limit of 500-3000 parallel • API Gateway throttle limit • 1000 requests per second • Invocation duration & timeouts • Lambda 15min • API Gateway integration 29sec Vadym Kazulkin @VKazulkin , ip.labs GmbH James Beswick: Operating Lambda: Application design and Service Quotas https://aws.amazon.com/blogs/compute/operating-lambda-application-design-and-service-quotas-part-1/
  • 23.
    Understand Service Quotas 2/2 •Payload limit • API Gateway 10 Mb • Lambda 6 Mb • SQS 256 Kb • Max Memory assigned to Lambda • 10GB Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 24.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 25.
    The reality is… Lambdais often just a small percentage of your total cost Vadym Kazulkin, @VKazulkin
  • 26.
    Understand your costat scale • Lambda • API Gateway • Dynamo DB capacity choices • Event Sources (SQS, SNS, EventBridge, Kinesis) • Step functions Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 27.
    Understand your costat scale • Logging costs (AWS CloudWatch Logs) • Monitoring costs (AWS CloudWatch) • Tracing (AWS X-Ray) • Remote API calls / 3rd party services price models Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 28.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 29.
    Understand organizational environment (structure, reponsibilities,knowledge, culture) • Do you already embrace DevOps best practices? Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 30.
    Tom McLaughlin Talk: Whatdo we do when the server goes away? • Observability (Logging, Monitoring, Tracing, & Alerting • Chaos Engineering & Game Days • Help understand constraints of AWS services & choose the right one Tom McLaughlin „What do we do when the server goes away” https://speakerdeck.com/tmclaugh/serverless-devops-what-do-we-do-when-the-server-goes-away Charity Majors „The Future of Ops Careers” https://thenewstack.io/the-future-of-ops-careers Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 31.
    Help understand constraintsof AWS services & choose the right one. Example Event Sources: Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 32.
    Co-evolution of practiceswith Serverless 1/2 • True DevOps • Complete infrastructure automation • Chaos Engineering • FinDev responsibilities in the teams Sheen Brisals “Why the ‘WHY’ matters more than the ‘WHAT’ in Serverless!” https://medium.com/lego-engineering/why-the-why-matters-more-than-the-what-in-serverless-2ef56c397962 DevOps Topologies: https://web.devopstopologies.com/
  • 33.
    Co-evolution of practiceswith Serverless 2/2 • Each team or even developer can have its own (AWS test) account per feature or service • Only minimal local testing (quick functional tests) • Adopt “testing in production” Michael Bryzek “What do you know about testing in production?” https://www.youtube.com/watch?v=z-ATZTUgaAo
  • 34.
    1. Application lifecycle 2.Workloads 3. Platform limitations 4. Cost at scale 5. Organizational environment 6. Platform and tooling maturity Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 35.
    Serverless platform andtooling maturity • Infrastructure-as-a-Code solutions maturity • with AWS Cloud Formation, AWS CDK • Development environment & framework maturity • with AWS SAM, AWS Amplify and Serverless Framework Image: http://tea.solgenomics.net/anatomy_viewer/microscopy/slm82_fruit Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 36.
    Serverless platform andtooling maturity • CI/CD • with AWS CodeCommit, CodeBuild, CodePipeline and CodeDeploy • Observability (Logging, Monitoring, Tracing, Alerting) • with AWS CloudWatch and X-Ray • Integration with 3rd party SaaS • with AWS Lambda Extensions (Epsagon, HashiCorp, Lumigo, Thundra, Datadog) • with AWS EvenBridge (PagerDuty, Zendesk, Shopify, Datadog) Image: http://tea.solgenomics.net/anatomy_viewer/microscopy/slm82_fruit AWS Lambda Extensions https://aws.amazon.com/de/about-aws/whats-new/2020/10/aws-lambda-extensions-integrate-operational-tools/ Vadym Kazulkin @VKazulkin , ip.labs GmbH
  • 37.