Serverless is more
FinDev than DevOps
Yan Cui @theburningmonk
Yan Cui
http://theburningmonk.com
@theburningmonk
Principal Engineer @
Independent Consultant
available in Austria, Switzerland, Germany,
Japan, Canada, Italy and US
available on 30+ platforms
~1,000,000 concurrent viewers
follow @dazneng for
updates about the
engineering team
We’re hiring! Visit
engineering.dazn.com
to learn more.
WE’RE HIRING!
AWS user since 2009
AWS user since 2009
https://productionreadyserverless.com
https://productionreadyserverless.com
get 40% off everything at
Manning.com with
ctwsrvscardiff19
What do you mean
by ‘serverless’?
“Serverless”
Gojko Adzic
It is serverless the same way
WiFi is wireless.
http://bit.ly/2yQgwwb
Serverless means…
don’t pay for it if no-one uses it
don’t need to worry about scaling
don’t need to provision and manage servers
“Function-as-a-Service”
AWS Lambda
Azure Functions
Google Cloud Functions
Auth0 Webtask
Spotinst Functions Kubeless
IBM Cloud Functions
AWS Lambda
AWS Lambda
API Gateway IOT SNS Kinesis CloudWatch
IaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
CaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
PaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
FaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
User User (scalable unit) Provider
IaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
CaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
PaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
FaaS
Function
Application
Runtime
Container
OS
Virtualization
Hardware
User User (scalable unit) Provider
Serverless
FaaS
other services…
Database
Storage
BI
Simon Wardley
Serverless will fundamentally change
how we build business around
technology and how you code.
Why serverless?
more Scalable
(and scales faster!)
Cheaper
(don’t pay for idle servers)
Resilience
(built-in redundancy and multi-AZ)
Secure
request
blue-green deployment
req/s
auto-scaling
us-east-1a
us-east-1b
us-east-1c
multi-AZ
the DevOps forcethe DevOps force
is strong with serverlessis strong with serverless
idea production
choose language
+ framework
master language
+ framework
figure out
deployment
configure AMI
configure ELB
configure
autoscaling
capacity planning
over-provision for
launch
are we doing
microservices?
configure CI/CD
idea production
choose language
+ framework
master language
+ framework
figure out
deployment
configure AMI
configure ELB
configure
autoscaling
capacity planning
over-provision for
launch
are we doing
microservices?
configure CI/CD
idea production
greater Velocity from idea to product
minimise undifferentiated
heavy-lifting
less ops responsibility on
your shoulders
Simon Wardley
https://blog.gardeviance.org/2016/11/why-fuss-about-serverless.html
Simon Wardley
https://blog.gardeviance.org/2016/11/why-fuss-about-serverless.html
the new business models around worth based development and
the collision of finance and development will literally knock your
socks off. Which is why the moniker "FinDev". Beyond the initial
investment in coding, I can create an almost variable cost business
model and redirect investment to maximise returns in ways that
most of you have never experienced. I know, I’ve been there.
Do you know what’s ROI?
Radio-on-Internet man!
Return on Investment
buy low, sell high
refactoring
“invest energy now to save cognitive load later”
translation
YAGNI principle
“don’t invest in things with no known return value”
translation
premature optimization is
the root of all evil
translation
“don’t invest in things with no known return value”
revenue
easy to measure
revenue
???
revenue
AWS
easy to measure
revenue
AWS, Engineers
essential, rare, and expensive
revenue
AWS, Engineers,
Real Estate
$$$$$$$$!!!
revenue
AWS, Engineers,
Real Estate, Tools
revenue
AWS, Engineers,
Real Estate, Tools,
Managers
revenue
essential, rare, and expensive
recruitment is one of the most important things
you can do as an employee
it’s also a significant investment
https://bit.ly/2FTXk4q
Cheaper
(don’t pay for idle servers)
this is a distraction from the
true saving from serverless
Thinking about
serverless costs
the right way
Model Training
Low-latency Prediction
Serving via Batching
developer
but I build CRUD web APIs, why should I
care if Lambda is a bad fit for machine
learning and serving realtime predictions?
https://aws.amazon.com/solutions/case-studies/financial-engines/
https://www.doc.ic.ac.uk/~rbc/papers/fse-serverless-17.pdf
“This paper presents two
case industrial studies of
early adopters, showing
how migrating an
application to the
Lambda deployment
architecture reduced
hosting costs – by
between 66% and 95%…”
if you wear your shoes on your hands,
should you really be surprised your feet is cold?
(hint: it’s not because the shoes are not warm!)
leverage: do more with less
idea production
choose language
+ framework
master language
+ framework
figure out
deployment
configure AMI
configure ELB
configure
autoscaling
capacity planning
over-provision for
launch
are we doing
microservices?
configure CI/CD
request
blue-green deployment
req/s
auto-scaling
us-east-1a
us-east-1b
us-east-1c
multi-AZ
Serverless might cost you just as much, or
even more, but you get so much more done
6 developers, 6 months
95% saving against EC2
15x no. of production releases per month
“what’s the ROI of feature X?”
how much time does it take to build?
how many engineer does it take to build?
how much does it cost to run it?
$5/hr
$5/hr
1 TPS
1000 TPS
$0.00138888888 per transaction
$0.00000138888 per transaction
actual cost per
transaction depends on
usage, which is outside
your control
TPS
Cost/Transaction
$5/hr
? TPS
runs multiple
services/features
$5/hr
? TPS
runs multiple
services/features
how do you attribute the
cost for each feature?
understanding the operational cost for
individual features are very difficult
We should forget about small efficiencies,
say about 97% of the time: premature
optimization is the root of all evil.
Donald Knuth
We should forget about small efficiencies,
say about 97% of the time: premature
optimization is the root of all evil.
Yet we should not pass up our
opportunities in that critical 3%.Donald Knuth
input output
engineering time
lower operational cost to
run the feature
input output
engineering time
lower operational cost to
run the feature
this is pretty $$$
cost of the conversation:
~$50 per dev per hour x 8 = $400
potential saving:
$10/month
cost of the conversation:
~$50 per dev per hour x 8 = $400
potential saving:
$10/month
break-even time for conversation:
$400 ÷ $10/month = 40 months!!!
We should forget about small efficiencies,
say about 97% of the time: premature
optimization is the root of all evil.
Yet we should not pass up our
opportunities in that critical 3%.Donald Knuth
$5/hr
hard to attribute cost to
individual feature
runs multiple
services/features
unpredictable cost per
transaction
PAY
PER USE
API Gateway Lambda DynamoDB
$0.05 $0.02 $0.01
cost per transaction: $0.08
Simon Wardley
the new business models around worth based development and
the collision of finance and development will literally knock your
socks off. Which is why the moniker "FinDev". Beyond the initial
investment in coding, I can create an almost variable cost business
model and redirect investment to maximise returns in ways that
most of you have never experienced. I know, I’ve been there.
Pay-per-use as a
competitive advantage
“how do you price your product?”
Business Model
how you plan to make money?
“If you're not paying for the product,
you are the product.”
generates revenue with memberships
usage of equipments cause wear and tear, adds
maintenance/upkeep and staffing cost
Business Model
Many people would sign up for membership, but few
would make use of their membership regularly.
subscription-based services
£
subscription fee
percentile
80%
profit!
loss…
transactional/metered/pay-per-use
£
percentile
your premium
what you charge
your customer
what the transaction
costs you
https://productionreadyserverless.com
subscription-based transactional (pay-per-use)
Online learning platforms loves the subscription model,
because most people won’t take full advantage of their
membership.
For students, the investment of time and energy far
outweigh the investment of money.
Learning
Management
System
students instructors
consum
e
content
publish
content
pays pays
as an instructor, you receive
% of revenue from
your courses
% of time students
spend on your coursesor
£
course fee
percentile
royalty
instructor
as an instructor, you receive
% of revenue from
your courses
% of time students
spend on your coursesor
USUALLY A FRACTION OFREVENUE YOU GENERATE
as an instructor, you receive
% of revenue from
your courses
% of time students
spend on your coursesor
USUALLY A FRACTION OFREVENUE YOU GENERATE
ONLY A FEW COURSES
MAKES GOOD REVENUE
what do you get for 20%
of your revenue?
as a content creator, you always lose…
what if…
100% royalty rate
operational cost
(bandwidth, hosting, etc.)
instructor
£
course fee
percentile
80%
profit!
loss…
instructor
£
course fee
percentile
80%
profit!
loss…
instructor
typical royalty rate
£
percentile
your premium
what you charge
instructors
what the transaction
costs you
platform
CloudFront on-demand pricing (per GB)
platform is incentivised to encourage
students to watch what they bought
platform is fair to instructors
low cost to instructors helps keep
course prices low
API Gateway Lambda DynamoDB
$0.05 $0.02 $0.01
cost per transaction: $0.08
Simon Wardley
the new business models around worth based development
and the collision of finance and development will literally
knock your socks off. Which is why the moniker "FinDev".
Beyond the initial investment in coding, I can create an
almost variable cost business model and redirect
investment to maximise returns in ways that most of you
have never experienced. I know, I’ve been there.
https://productionreadyserverless.com
get 40% off everything at
Manning.com with
ctwsrvscardiff19

Serverless is more FinDev than DevOps