"It’s not only Lambda! Economics behind Serverless" at Serverless Architecture Conference April 2019 by Christian Bannes and Vadym Kazulkin (both ip.labs GmbH)
When we talk about prices, we often only talk about Lambda costs. But we rarey use only Lambda in our applications. Usually, we have other building blocks like API Gateway, data sources like SNS, SQS or Kinesis and Log service (Cloud Watch). Also, we store our data either in S3 or in serverless databases like DynamoDB or recently in Aurora Serverless. All these services have their own price models which we have to pay attention to. Moreover, we have to consider application data transfer costs. In this talk, we will draw the complete picture about the costs in the serverless applications, look at the Total Cost of Ownership and make some recommendations about when it’s worth using serverless and when the traditional approach (EC2)
FaaS or not to FaaS. Visible and invisible benefits of the Serverless paradig...
Similar to "It’s not only Lambda! Economics behind Serverless" at Serverless Architecture Conference April 2019 by Christian Bannes and Vadym Kazulkin (both ip.labs GmbH)
The State of Serverless Computing | AWS Public Sector Summit 2017Amazon Web Services
Similar to "It’s not only Lambda! Economics behind Serverless" at Serverless Architecture Conference April 2019 by Christian Bannes and Vadym Kazulkin (both ip.labs GmbH) (20)
"It’s not only Lambda! Economics behind Serverless" at Serverless Architecture Conference April 2019 by Christian Bannes and Vadym Kazulkin (both ip.labs GmbH)
1. It‘s not only Lamda
Economics behind serverless
by Christian Bannes and Vadym Kazulkin, ip.labs GmbH
27. Power tuning
lambda
• Executes different
settings in parallel
• Outputs the optimal
setting
Image: https://github.com/alexcasalboni/aws-lambda-power-tuning
31. Event Sources
• SQS and SNS are
charged for requests
• Kinesis charges for
shard hours & PUT
requests
Image: https://blog.binaris.com/lambda-pricing-pitfalls/
32. Event Sources
• Cost for Kinesis grows
with slower rate
• Attractive at to
operate at scale
Image: https://blog.binaris.com/lambda-pricing-pitfalls/
36. Example
$2400 / Month $520 / Month
100 API requests per second 24/7
• API Gateway
• Lambda with 1GB and
300ms per request
• Load balancer
• 3 x M5.xlarge with
16GB each
37. Serverless vs VM
• "Pay as you go" can significantly reduce server cost
because you don’t pay for ide time
• Cost for compute is always higher
• For serverless you need right workload and architecture
• For constantly high workloads it can quickly become
expensive
40. TCO Full Picture
Forrest Brazeal „The Business Case For Serverless”
https://www.trek10.com/blog/business-case-for-serverless/
No Infrastructure
Maintanence
Auto Scaling
Built in
Fewer Engineers
Required
Lower Technical
Debt
Focus on Business
Value & Innovation
Faster Time to
Market
46. Explore phase
• Quickly validate
hypotheses
• Rapidly experiment
• Run experiments as
cheaply as possible
Image: burst.shopify.com/photos/a-look-across-the-landscape-with-view-of-the-sea
Serverless is a perfect fit
47. Exploit phase
• Built something that does
provide customer value
• Build it on scale
• Build a profitable product
around it
Image: Robert Scoble via Flickr
partly serverless and partly not
serverless architecture
48. Application lifecycle
• How much of my stack should I own
to be able to deliver business value?
• Outsource SLA, regulatory
compliance, price, and roadmap to
my service provider?
50. FinDev Concept
Activity-based costing on a
digital operation-by-operation
basis
• Figure out features which deliver
business value comparing to their
cost
Aleksander Simovic & Mark Schwarz „FinDev and Serverless Microeconomics: Part 1”
https://aws.amazon.com/de/blogs/enterprise-strategy/findev-and-serverless-microeconomics-part-1/
51. 1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Operational constraints imposed by other dependencies
6. Organizational knowledge
53. Understand your workloads
• Do we need to access specialized
hardware ?
• GPU access required?
• Do we need constantly high
performance?
• Response time below 100 ms
(e.g. bidding or gaming platforms)
“A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
54. Understand your workloads
• Do we need high throughput ?
• Lambda‘s network bandwidth is
limited shared between all functions
packed on the same VM
• Do functions need to communicate
with each other?
• functions 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
55. 1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Operational constraints imposed by other dependencies
6. Organizational knowledge
56. Understand platform
limitations
• Cold start
• Lambda with and without VPC for
each runtime
• Invocation duration/ Timeouts
• Lambda 15min
• API Gateway integration 29sec
• Max Memory
• Lambda 3GB
57. Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
58. Ajay Nair „Become a Serverless Black Belt” https://www.youtube.com/watch?v=oQFORsso2go
59. Understand platform
limitations
• Cold start
• Lambda with and without VPC for
each runtime
• Invocation duration/timeouts
• Lambda 15min
• API Gateway integration 29sec
• Max Memory
• Lambda 3GB
60. Understand platform
limitations
• Max concurrent invocations
• Lambda 3000 per account
• Scaling thresholds
• Dynamo DB provisioned and on-
demand capacities
61. 1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Operational constraints imposed by other dependencies
6. Organizational knowledge
62. Understand your cost at
scale
• Lambda
• API Gateway
• Dynamo DB capacity choices
• Remote API calls
• Logging costs
• Monitoring costs
63. 1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Operational constraints imposed by other dependencies
6. Organizational knowledge
64. Understand the operational constraints
imposed by other dependencies
• Language runtime choice
• Can be forced by some dependencies to
other libraries
• Relation database choice
• Aurora Serverless: either use VPC or use
Data API
Yan Cui „Not so FaaS” https://blog.binaris.com/not-so-faas/
65. 1. Application lifecycle
2. Workloads
3. Platform limitations
4. Cost at scale
5. Operational constraints imposed by other dependencies
6. Organizational knowledge
69. Berkeley View on
Serverless Computing
“A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
70. Berkeley View on
Serverless Computing
• Provide low latency and high IOPS
Serverless Ephemeral Storage
• Provide Serverless Durable Storage
• Improve Networking
• Improve security
• Accommodate cost-performance
“A Berkeley View on Serverless Computing” https://www2.eecs.berkeley.edu/Pubs/TechRpts/2019/EECS-2019-3.html
71. Predictions
• More available runtimes (e.g. GraalVM)
• Platform limitations will be weakened or
disappear
• New use cases of serverless (Big Data,
ML/AI)
• Access to specialized hardware
• Companies gaining advantages from the
FinDev approach
Image: Marco Verch via Flickr (Creative Commons 2.0)
https://www.flickr.com/photos/30478819@N08/26528539689/
72. Serverless vs VM
• "Pay as you go" can significantly reduce
server cost because you don’t pay for ide
time
• Cost for compute is always higher
• For serverless you need right workload and
architecture
• For constantly high workloads it can quickly
become expensive
• Application lifecycle
• Workloads
• Platform limitations
• Cost at scale
• Operational constraints
• Organizational knowledge
FaaS or not to FaaS