Cloud Native Cost Optimization 
Adrian Cockcroft @adrianco 
Technology Fellow - Battery Ventures 
UCC2014 Cloud Control Workshop - December 2014
@adrianco 
What does 
everyone want?
@adrianco 
Less Time 
Less Cost
@adrianco 
Faster 
! 
See talks by @adrianco 
Speed and Scale - QCon New York 
Fast Delivery - GOTO Copenhagen
@adrianco 
Cheaper 
! 
This talk: 
How to use Cloud Native architecture to 
reduce cost without slowing down
Speeding up Development 
Cloud Native Applications 
Cost Optimization
Why am I here? 
%*&!” 
By Simon Wardley http://enterpriseitadoption.com/
Why am I here? 
%*&!” 
2009 
By Simon Wardley http://enterpriseitadoption.com/
Why am I here? 
%*&!” 
2009 
By Simon Wardley http://enterpriseitadoption.com/
Why am I here? 
@adrianco’s job at the 
intersection of cloud 
and Enterprise IT, 
looking for disruption 
and opportunities. 
%*&!” 
By Simon Wardley http://enterpriseitadoption.com/ 
2014 
2009
Why am I here? 
@adrianco’s job at the 
intersection of cloud 
and Enterprise IT, 
looking for disruption 
and opportunities. 
%*&!” 
By Simon Wardley http://enterpriseitadoption.com/ 
2014 
2009 
Example: Docker 
wasn’t on anyone’s 
roadmap for 2014. It’s 
on everyone’s roadmap 
for 2015.
What does @adrianco do? 
Maintain 
Relationship with 
Cloud Vendors 
@adrianco 
Technology Due 
Diligence on Deals 
Presentations at 
Conferences 
Presentations at 
Companies 
Technical Advice 
for Portfolio 
Companies 
Program 
Committee for 
Conferences 
Networking with 
Tinkering with Interesting People 
Technologies
Speeding Up 
Development
Observe 
Orient 
Act Continuous 
Delivery 
Decide
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
INNOVATION 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Analysis 
Model 
Hypotheses 
INNOVATION 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Model 
Hypotheses 
INNOVATION 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Model 
Hypotheses 
INNOVATION 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Model 
Hypotheses 
INNOVATION 
CULTURE 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Launch AB 
Test 
Automatic 
Deploy 
Incremental 
Features 
Model 
Hypotheses 
INNOVATION 
CULTURE 
Measure 
Customers 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Measure 
Customers 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Launch AB 
Test 
Automatic 
Deploy 
Incremental 
Features 
Model 
Hypotheses 
INNOVATION 
CULTURE 
CLOUD 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Measure 
Customers 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Launch AB 
Test 
Automatic 
Deploy 
Incremental 
Features 
Model 
Hypotheses 
INNOVATION 
CULTURE 
CLOUD 
Continuous 
Delivery
Land grab 
opportunity Competitive 
Observe 
Orient 
Decide 
Measure 
Customers 
Act 
Move 
Customer Pain 
Point 
Analysis 
BIG DATA 
Plan Response 
JFDI 
Share Plans 
Launch AB 
Test 
Automatic 
Deploy 
Incremental 
Features 
Model 
Hypotheses 
INNOVATION 
CULTURE 
CLOUD 
Continuous 
Delivery
Release Plan 
Developer 
Developer 
Developer 
Developer 
Developer 
QA Release 
Integration 
Ops Replace Old 
With New 
Release 
Monolithic service updates 
Works well with a small number 
of developers and a single 
language like php, java or ruby
Release Plan 
Developer 
Developer 
Developer 
Developer 
Developer 
Monolithic service updates 
QA Release 
Integration 
Ops Replace Old 
With New 
Release 
Bugs 
Works well with a small number 
of developers and a single 
language like php, java or ruby
Release Plan 
Developer 
Developer 
Developer 
Developer 
Developer 
Monolithic service updates 
QA Release 
Integration 
Ops Replace Old 
With New 
Release 
Bugs 
Bugs 
Works well with a small number 
of developers and a single 
language like php, java or ruby
@adrianco 
Breaking Down the SILOs
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN 
Product Team Using Monolithic Delivery 
Product Team Using Monolithic Delivery
Product Team Using Monolithic Delivery 
Product Team Using Monolithic Delivery 
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN 
Product Team Using Microservices 
Product Team Using Microservices 
Product Team Using Microservices
Product Team Using Monolithic Delivery 
Product Team Using Monolithic Delivery 
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN 
Product Team Using Microservices 
Product Team Using Microservices Platform Team 
Product Team Using Microservices
Product Team Using Monolithic Delivery 
Product Team Using Monolithic Delivery 
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN 
Product Team Using Microservices 
Platform Team 
A 
P 
I Product Team Using Microservices 
Product Team Using Microservices
Product Team Using Monolithic Delivery 
Product Team Using Monolithic Delivery 
UX Dev Adm Prod 
Mgr 
@adrianco 
Breaking Down the SILOs 
QA DBA Sys 
Adm 
Net 
Adm 
SAN 
Product Team Using Microservices 
Platform Team 
A 
P 
I Product Team Using Microservices 
Product Team Using Microservices 
DevOps is a Re-Org!
Developer 
Developer 
Developer 
Developer 
Developer 
Old Release Still 
Running 
Release Plan 
Release Plan 
Release Plan 
Release Plan 
Immutable microservice deployment 
scales, is faster with large teams and 
diverse platform components
Developer 
Developer 
Developer 
Developer 
Developer 
Immutable microservice deployment 
scales, is faster with large teams and 
diverse platform components 
Old Release Still 
Running 
Release Plan 
Release Plan 
Release Plan 
Release Plan 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production
Developer 
Developer 
Developer 
Developer 
Developer 
Immutable microservice deployment 
scales, is faster with large teams and 
diverse platform components 
Old Release Still 
Running 
Release Plan 
Release Plan 
Release Plan 
Release Plan 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Bugs
Developer 
Developer 
Developer 
Developer 
Developer 
Immutable microservice deployment 
scales, is faster with large teams and 
diverse platform components 
Old Release Still 
Running 
Release Plan 
Release Plan 
Release Plan 
Release Plan 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Bugs 
Deploy 
Feature to 
Production
Configure 
Configure 
Developer 
Developer 
Developer 
Release Plan 
Release Plan 
Release Plan 
Standardized portable container 
deployment saves time and effort 
Deploy 
Standardized 
Services 
https://hub.docker.com
Configure 
Configure 
Developer 
Developer 
Developer 
Release Plan 
Release Plan 
Release Plan 
Deploy 
Standardized 
Services 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Deploy 
Feature to 
Production 
Bugs 
Deploy 
Feature to 
Production 
Standardized portable container 
deployment saves time and effort 
https://hub.docker.com
@adrianco 
Developing at the Speed of Docker 
Developers 
• Compile/Build 
• Seconds 
Extend container 
• Package dependencies 
• Seconds 
PaaS deploy Containers 
• Docker startup 
• Seconds
@adrianco 
Developing at the Speed of Docker 
Developers 
• Compile/Build 
• Seconds 
Extend container 
• Package dependencies 
• Seconds 
PaaS deploy Containers 
• Docker startup 
• Seconds 
Speed is addictive, hard to go back to taking much longer to get things done
@adrianco 
What Happened? 
Rate of change 
increased 
Cost and size and 
risk of change 
reduced
Cloud Native 
Applications
Cloud Native 
A new engineering challenge 
Construct a highly agile and highly 
available service from ephemeral and 
assumed broken components
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
Inspiration
State of the Art in Cloud Native 
Microservice Architectures 
AWS Re:Invent : Asgard to Zuul https://www.youtube.com/watch?v=p7ysHhs5hl0 
Resiliency at Massive Scale https://www.youtube.com/watch?v=ZfYJHtVL1_w 
Microservice Architecture https://www.youtube.com/watch?v=CriDUYtfrjs 
http://www.infoq.com/presentations/scale-gilt 
http://www.slideshare.net/mcculloughsean/itier-breaking-up-the-monolith-philly-ete 
http://www.infoq.com/presentations/Twitter-Timeline-Scalability 
http://www.infoq.com/presentations/twitter-soa 
http://www.infoq.com/presentations/Zipkin 
https://speakerdeck.com/mattheath/scaling-micro-services-in-go-highload-plus-plus-2014
@adrianco 
Traditional vs. Cloud Native Storage 
Business 
Logic 
Database 
Master 
Fabric 
Storage 
Arrays 
Database 
Slave 
Fabric 
Storage 
Arrays
@adrianco 
Traditional vs. Cloud Native Storage 
Business 
Logic 
Database 
Master 
Fabric 
Storage 
Arrays 
Database 
Slave 
Fabric 
Storage 
Arrays 
Business 
Logic 
Cassandra 
Zone A nodes 
Cassandra 
Zone B nodes 
Cassandra 
Zone C nodes 
Cloud Object 
Store Backups
@adrianco 
Traditional vs. Cloud Native Storage 
Business 
Logic 
Database 
Master 
Fabric 
Storage 
Arrays 
Database 
Slave 
Fabric 
Storage 
Arrays 
Business 
Logic 
Cassandra 
Zone A nodes 
Cassandra 
Zone B nodes 
Cassandra 
Zone C nodes 
Cloud Object 
Store Backups 
SSDs inside 
arrays disrupt 
incumbent 
suppliers
@adrianco 
Traditional vs. Cloud Native Storage 
Business 
Logic 
Database 
Master 
Fabric 
Storage 
Arrays 
Database 
Slave 
Fabric 
Storage 
Arrays 
Business 
Logic 
Cassandra 
Zone A nodes 
Cassandra 
Zone B nodes 
Cassandra 
Zone C nodes 
Cloud Object 
Store Backups 
SSDs inside 
ephemeral 
instances 
disrupt an 
entire industry 
SSDs inside 
arrays disrupt 
incumbent 
suppliers
@adrianco 
Traditional vs. Cloud Native Storage 
Business 
Logic 
Database 
Master 
Fabric 
Storage 
Arrays 
Database 
Slave 
Fabric 
Storage 
Arrays 
Business 
Logic 
Cassandra 
Zone A nodes 
Cassandra 
Zone B nodes 
Cassandra 
Zone C nodes 
Cloud Object 
Store Backups 
SSDs inside 
ephemeral 
instances 
disrupt an 
entire industry 
SSDs inside 
arrays disrupt 
incumbent 
suppliers 
See also discussions about “Hyper-Converged” storage
● Edda - the “black box flight recorder” for configuration state 
● Chaos Monkey - enforcing stateless business logic 
● Chaos Gorilla - enforcing zone isolation/replication 
● Chaos Kong - enforcing region isolation/replication 
● Security Monkey - watching for insecure configuration settings 
● See over 40 NetflixOSS projects at netflix.github.com 
● Get “Technical Indigestion” trying to keep up with techblog.netflix.com 
@adrianco 
Trust with Verification
Netflix Cloud Native Benchmark
Autoscaled Ephemeral Instances at Netflix 
Largest services use autoscaled red/black code pushes 
Average lifetime of an instance is 36 hours 
Push 
Autoscale Up 
Autoscale Down
Netflix Automatic Code Deployment Canary 
Bad Signature 
Implemented 
by Simon Tuffs
Netflix Automatic Code Deployment Canary 
Bad Signature 
Implemented 
by Simon Tuffs
@adrianco 
Happy Canary Signature
@adrianco 
Speeding Up The Platform 
Datacenter Snowflakes 
• Deploy in months 
• Live for years
@adrianco 
Speeding Up The Platform 
Datacenter Snowflakes 
• Deploy in months 
• Live for years 
Virtualized and Cloud 
• Deploy in minutes 
• Live for weeks
@adrianco 
Speeding Up The Platform 
Datacenter Snowflakes 
• Deploy in months 
• Live for years 
Virtualized and Cloud 
• Deploy in minutes 
• Live for weeks 
Docker Containers 
• Deploy in seconds 
• Live for minutes/hours
@adrianco 
Speeding Up The Platform 
Datacenter Snowflakes 
• Deploy in months 
• Live for years 
Virtualized and Cloud 
• Deploy in minutes 
• Live for weeks 
Docker Containers 
• Deploy in seconds 
• Live for minutes/hours 
AWS Lambda 
• Deploy in milliseconds 
• Live for seconds
AWS Lambda 
• Deploy in milliseconds 
• Live for seconds 
@adrianco 
Speeding Up The Platform 
Datacenter Snowflakes 
• Deploy in months 
• Live for years 
Virtualized and Cloud 
• Deploy in minutes 
• Live for weeks 
Docker Containers 
• Deploy in seconds 
• Live for minutes/hours 
Speed enables and encourages new microservice architectures
With AWS Lambda 
compute resources are charged 
by the 100ms, not the hour 
First 1,000,000 node.js executions/month are free 
First 400,000 GB-seconds of RAM-CPU are free
Monitoring Requirements 
Metric resolution microseconds 
Metric update rate 1 second 
Metric to display latency less than human 
attention span (<10s)
@adrianco 
Low Latency SaaS Based Monitors 
www.vividcortex.com and www.boundary.com
Adrian’s Tinkering Projects 
Model and visualize microservices 
Simulate interesting architectures 
! 
See github.com/adrianco/spigo 
Simulate Protocol Interactions in Go 
! 
See github.com/adrianco/d3grow 
Dynamic visualization
Cost Optimization
Capacity Optimization for a 
Single System Bottleneck 
Upper Spec Limit 
! 
When demand 
probability exceeds 
USL by 4.0 sigma 
scale up resource to 
maintain low latency 
Lower Spec Limit 
! 
When demand 
probability is below 
USL by 3.0 sigma 
scale down resource 
to save money 
Documentation on Capability Plots 
To get accurate high dynamic range histograms see http://hdrhistogram.org/ 
Slideshare: 2003 Presentation on Capacity Planning Methods See US Patent: 7467291
But interesting systems 
don’t have a single 
bottleneck nowadays…
But interesting systems 
don’t have a single 
bottleneck nowadays…
@adrianco 
How is Cost 
Measured?
1 
Bottom Up 
2 
Product 
3 
Top Down
@adrianco 
Bottom Up Costs 
Add up the cost to 
buy and operate 
every component 
1
@adrianco 
Product Cost 
Cost of delivering 
and maintaining 
each product 
2
@adrianco 
Top Down Costs 
Divide total budget 
by the number of 
components 
3
@adrianco 
Top Down vs. Bottom Up 
Will never match! 
Hidden Subsidies vs. 
Hidden Costs 
3 
1
@adrianco 
Agile Team Product Profit 
Value minus costs 
Time to value 
ROI, NPV, MMF 
Profit center 
2 $
@adrianco 
What about cloud 
costs?
@adrianco 
Cloud Native Cost Optimization 
Optimize for speed first 
Turn it off! 
Capacity on demand 
Consolidate and Reserve 
Plan for price cuts 
FOSS tooling 
$$ $
@adrianco 
The Capacity 
Planning Problem
@adrianco 
Best Case Waste 
Product(Launch(Agility(2(Rightsized( 
Pre2Launch( 
Build2out( 
Tes9ng( 
Launch( 
Growth( 
Growth( 
Demand( 
Cloud( 
Datacenter( 
$( 
Cloud capacity 
used is maybe 
half average 
DC capacity
@adrianco 
Failure to Launch 
Product(Launch(-(Under-es1mated( 
Pre-Launch 
Build-out 
Testing 
Launch 
Growth 
Growth 
Mad scramble 
to add more DC 
capacity during 
launch phase 
outages
@adrianco 
Over the Top Losses 
Product(Launch(Agility(–(Over6es8mated( 
Pre-Launch 
Build-out 
Testing 
Launch 
Growth 
Growth 
$ 
Capacity wasted 
on failed launch 
magnifies the 
losses
@adrianco 
Turning off Capacity 
Off-peak production 
Test environments 
Dev out of hours 
When%you%turn%off%your%cloud%resources,% you%actually%stop%paying%for%them% 
Dormant Data Science
@adrianco 
Containerize Test Environments 
Snapshot or freeze 
Fast restart needed 
Persistent storage 
40 of 168 hrs/wk 
Bin-packed containers 
shippable.com saved 70%
@adrianco 
Seasonal Savings 
50% Savings 
1 5 9 13 17 21 25 29 33 37 41 45 49 
Web Servers 
Week 
Optimize during a year 
Weekly&CPU&Load&
@adrianco 
Autoscale the Costs Away 
50%+%Cost%Saving% 
Scale%up/down% 
by%70%+% 
Move%to%Load=Based%Scaling%
@adrianco 
Daily Duty Cycle 
Instances' Business'Throughput' 
Reactive Autoscaling 
saves around 50% 
Predictive Autoscaling saves around 70% 
See Scryer on Netflix Tech Blog
@adrianco 
Underutilized and Unused 
AWS$Support$–$Trusted$Advisor$–$ 
Your$personal$cloud$assistant$
@adrianco 
Clean Up the Crud 
Other&simple&op-miza-on&-ps& 
• Don’t&forget&to…& 
– Disassociate&unused&EIPs& 
– Delete&unassociated&Amazon& 
EBS&volumes& 
– Delete&older&Amazon&EBS& 
snapshots& 
– Leverage&Amazon&S3&Object& 
Expira-on& 
& Janitor&Monkey&cleans&up&unused&resources&
@adrianco 
Total Cost of Oranges 
When%Comparing%TCO…! 
Make!sure!that! 
you!are!including! 
all!the!cost!factors! 
into!considera4on! 
Place% 
Power% 
Pipes% 
People% 
Pa6erns%
@adrianco 
Total Cost of Oranges 
When%Comparing%TCO…! 
Make!sure!that! 
you!are!including! 
all!the!cost!factors! 
into!considera4on! 
Place% 
Power% 
Pipes% 
People% 
Pa6erns% 
How much does 
datacenter automation 
software and support 
cost per instance?
@adrianco 
When Do You Pay? 
bill 
Run 
My Stuff 
Now 
Next 
Month 
Datacenter Up Front Costs 
Lease 
Building 
Ages 
Ago 
Install 
AC etc 
Rack & 
Stack 
Private 
Cloud SW
Cost Model Comparisons 
AWS has most complex model 
• Both highest and lowest cost options! 
CPU/Memory Ratios Vary 
• Can’t get same config everywhere 
Features Vary 
• Local SSD included on some vendors, not others 
• Network and storage charges also vary
@adrianco 
Digital Ocean Flat Pricing 
Hourly Price ($0.06/hr) Monthly Price ($40/mo) 
$ No Upfront $ No Upfront 
$0.060/hr $0.056/hr 
$1555/36mo $1440/36mo 
Savings 7% 
Prices on Dec 7th, for 2 Core, 4G RAM, SSD, purely to show typical savings
@adrianco 
Google Sustained Usage 
Full Price Without 
Sustained Usage 
Typical Sustained 
Usage Each Month 
Full Sustained Usage 
Each Month 
$ No Upfront $ No Upfront $ No Upfront 
$0.063/hr $0.049/hr $0.045/hr 
$1633/36mo $1270/36mo $1166/36mo 
Savings 22% 29% 
Prices on Dec 7th, for n1.standard-1 (1 vCPU, 3.75G RAM, no disk) purely to show typical savings
@adrianco 
AWS Reservations 
On Demand No Upfront 
1 year 
Partial Upfront 
3 year 
All Upfront 
3 year 
$ No Upfront $No Upfront $337 Upfront $687 Upfront 
$0.070/hr $0.050/hr $0.0278/hr $0.00/hr 
$1840/36mo $1314/36mo $731/36mo $687/36mo 
Savings 29% 60% 63% 
Prices on Dec 7th, for m3.medium (1 vCPU, 3.75G RAM, SSD) purely to show typical savings
@adrianco 
Blended Benefits Mix$and$Match$Reserved$Types$and$On4Demand$ 
Instances( 
On8Demand 
Light&RI Light&RI Light&RI Light&RI 
Heavy&Utilization&Reserved Instances 
Days(of(Month( 
12 
10 
8 
6 
4 
2 
0 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 
On Demand 
Partial Upfront 
All Upfront
@adrianco 
Consolidated Cost Cutting Consolidated+Billing:+Single+payer+for+a+group+of+ 
accounts+ 
• One$Bill+for+mul7ple+accounts+ 
• Easy$Tracking$of+account+ 
charges+(e.g.,+download+CSV+of+ 
cost+data)+ 
• Volume$Discounts+can+be+ 
reached+faster+with+combined+ 
usage+ 
• Reserved$Instances$are+shared+ 
across+accounts+(including+RDS+ 
Reserved+DBs)+
@adrianco 
Production Priority Over%Reserve(the(Produc0on(Environment( 
Produc0on(Env.( 
Total#Capacity# 
Account( 100#Reserved# 
QA/Staging(Env.( 
Account( 0#Reserved## 
Perf(Tes0ng(Env.( 
Account( 0#Reserved## 
Development(Env.( 
Account( 0#Reserved# 
Storage(Account( 0#Reserved#
@adrianco 
Actual Reservation Usage Consolidated+Billing+Borrows+Unused+Reserva4ons+ 
Produc4on+Env.+ 
Total#Capacity# 
Account+ 68#Used# 
QA/Staging+Env.+ 
Account+ 10#Borrowed# 
Perf+Tes4ng+Env.+ 
Account+ 6#Borrowed## 
Development+Env.+ 
Account+ 12#Borrowed# 
Storage+Account+ 4#Borrowed#
@adrianco 
Consolidated Reservations 
Burst capacity guarantee 
Higher availability with lower cost 
Other accounts soak up any extra 
Monthly billing roll-up 
Capitalize upfront charges! 
But: Fixed location and instance type
@adrianco 
Re-sell Reservations 
Reserved'Instance'Marketplace' 
Buy$a$smaller$term$instance$ 
Buy$instance$with$different$OS$or$type$ 
Buy$a$Reserved$instance$in$different$region$ 
Sell$your$unused$Reserved$Instance$ 
Sell$unwanted$or$over;bought$capacity$ 
Further$reduce$costs$by$op>mizing$
@adrianco 
Use EC2 Spot Instances 
Cloud native 
dynamic autoscaled 
spot instances 
! 
Real world total 
savings up to 50%
@adrianco 
Right Sizing Instances 
Fit the instance size to the workload
@adrianco 
Technology Refresh 
Older m1 and m2 families 
• Slower CPUs 
• Higher response times 
• Smaller caches (6MB) 
• Oldest m1.xlarge 
• 15G/8.5ECU/35c 23ECU/$ 
• Old m2.xlarge 
• 17G/6.5ECU/25c 26ECU/$ 
New m3 family 
• Faster CPUs 
• Lower response times 
• Larger caches (20MB) 
• Java perf ratio > ECU 
• New m3.xlarge 
• 15G/13ECU/28c 46ECU/$ 
• 77% better ECU/$ 
• Deploy fewer instances
@adrianco 
Data Science for Free 
Follow%the%Customer%(Run%web%servers)%during%the%day% 
No.%of%Reserved% 
Instances% 
Follow%the%Money%(Run%Hadoop%clusters)%at%night% 
16 
14 
12 
10 
8 
6 
4 
2 
0 
Mon Tue Wed Thur Fri Sat Sun 
No#of#Instances#Running# 
Week 
Auto7Scaling7Servers 
Hadoop7Servers
@adrianco 
Six Ways to Cut Costs 
Building#Cost>Aware#Cloud#Architectures# 
#1#Business#Agility#by#Rapid#Experimenta8on#=#Profit# 
#2#Business>driven#Auto#Scaling#Architectures#=#Savings## 
#3#Mix#and#Match#Reserved#Instances#with#On>Demand#=#Savings# 
#4#Consolidated#Billing#and#Shared#Reserva8ons#=#Savings# 
#5#Always>on#Instance#Type#Op8miza8on#=#Recurring#Savings# 
#6#Follow#the#Customer#(Run#web#servers)#during#the#day# 
Follow#the#Money#(Run#Hadoop#clusters)#at#night# 
Credit to Jinesh Varia of AWS for this summary
Data shown is purely illustrative 
@adrianco 
Expect Prices to Drop 
Three Years Halving Every 18mo = maybe 40% over-all savings 
100 
75 
50 
25 
0 
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
@adrianco 
Compounded 
Savings
100 Traditional 
application 
using AWS 
heavy use 
reservations 
30 30 25 
@adrianco 
Lift and Shift Compounding 
100 
75 
50 
25 
0 
70 70 70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts 
Base price is for capacity bought up-front
100 Traditional 
application 
using AWS 
heavy use 
reservations 
30 30 25 
@adrianco 
Lift and Shift Compounding 
100 
75 
50 
25 
0 
70 70 70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts 
Base price is for capacity bought up-front
100 Traditional 
application 
using AWS 
heavy use 
reservations 
30 30 25 
@adrianco 
Lift and Shift Compounding 
100 
75 
50 
25 
0 
70 70 70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts 
Base price is for capacity bought up-front
100 Traditional 
application 
using AWS 
heavy use 
reservations 
30 30 25 
@adrianco 
Lift and Shift Compounding 
100 
75 
50 
25 
0 
70 70 70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts 
Base price is for capacity bought up-front
100 Cloud native 
application 
partially optimized 
light use reservations 
20 15 25 
@adrianco 
Conservative Compounding 
100 
75 
50 
25 
0 
35 
50 
70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
100 Cloud native 
application 
partially optimized 
light use reservations 
20 15 25 
@adrianco 
Conservative Compounding 
100 
75 
50 
25 
0 
35 
50 
70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
100 Cloud native 
application 
partially optimized 
light use reservations 
20 15 25 
@adrianco 
Conservative Compounding 
100 
75 
50 
25 
0 
35 
50 
70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
100 Cloud native 
application 
partially optimized 
light use reservations 
20 15 25 
@adrianco 
Conservative Compounding 
100 
75 
50 
25 
0 
35 
50 
70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
100 Cloud native 
application 
partially optimized 
light use reservations 
20 15 25 
@adrianco 
Conservative Compounding 
100 
75 
50 
25 
0 
35 
50 
70 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
100 Cloud native application 
fully optimized autoscaling 
mixed reservation use 
costs 4% of base price 
over three years! 
12 8 6 4 
@adrianco 
Agressive Compounding 
100 
75 
50 
25 
0 
25 
50 
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
@adrianco 
Cost Monitoring and Optimization
@adrianco 
Final Thoughts 
Turn off idle instances 
Clean up unused stuff 
Optimize for pricing model 
Assume prices will go down 
Go cloud native to be fast and save 
Complex dynamic control issues!
@adrianco 
Further Reading 
● Battery Ventures Blog http://www.battery.com/powered 
● Adrian’s Blog http://perfcap.blogspot.com and Twitter @adrianco 
● Slideshare http://slideshare.com/adriancockcroft 
! 
● Monitorama Opening Keynote Portland OR - May 7th, 2014 - Video available 
● GOTO Chicago Opening Keynote May 20th, 2014 - Video available 
● Qcon New York – Speed and Scale - June 11th, 2014 - Video available 
● Structure - Cloud Trends - San Francisco - June 19th, 2014 - Video available 
● GOTO Copenhagen/Aarhus – Denmark – Sept 25th, 2014 
● DevOps Enterprise Summit - San Francisco - Oct 21-23rd, 2014 - Videos available 
● GOTO Berlin - Germany - Nov 6th, 2014 
● Dockercon Europe - Amsterdam - Microservices - December 4th, 2014 
See www.battery.com for a list of portfolio investments

Cloud Native Cost Optimization UCC

  • 1.
    Cloud Native CostOptimization Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures UCC2014 Cloud Control Workshop - December 2014
  • 2.
    @adrianco What does everyone want?
  • 3.
  • 4.
    @adrianco Faster ! See talks by @adrianco Speed and Scale - QCon New York Fast Delivery - GOTO Copenhagen
  • 5.
    @adrianco Cheaper ! This talk: How to use Cloud Native architecture to reduce cost without slowing down
  • 6.
    Speeding up Development Cloud Native Applications Cost Optimization
  • 7.
    Why am Ihere? %*&!” By Simon Wardley http://enterpriseitadoption.com/
  • 8.
    Why am Ihere? %*&!” 2009 By Simon Wardley http://enterpriseitadoption.com/
  • 9.
    Why am Ihere? %*&!” 2009 By Simon Wardley http://enterpriseitadoption.com/
  • 10.
    Why am Ihere? @adrianco’s job at the intersection of cloud and Enterprise IT, looking for disruption and opportunities. %*&!” By Simon Wardley http://enterpriseitadoption.com/ 2014 2009
  • 11.
    Why am Ihere? @adrianco’s job at the intersection of cloud and Enterprise IT, looking for disruption and opportunities. %*&!” By Simon Wardley http://enterpriseitadoption.com/ 2014 2009 Example: Docker wasn’t on anyone’s roadmap for 2014. It’s on everyone’s roadmap for 2015.
  • 12.
    What does @adriancodo? Maintain Relationship with Cloud Vendors @adrianco Technology Due Diligence on Deals Presentations at Conferences Presentations at Companies Technical Advice for Portfolio Companies Program Committee for Conferences Networking with Tinkering with Interesting People Technologies
  • 13.
  • 14.
    Observe Orient ActContinuous Delivery Decide
  • 15.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Measure Customers Continuous Delivery
  • 16.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point INNOVATION Measure Customers Continuous Delivery
  • 17.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Analysis Model Hypotheses INNOVATION Measure Customers Continuous Delivery
  • 18.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Analysis BIG DATA Model Hypotheses INNOVATION Measure Customers Continuous Delivery
  • 19.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Model Hypotheses INNOVATION Measure Customers Continuous Delivery
  • 20.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Model Hypotheses INNOVATION CULTURE Measure Customers Continuous Delivery
  • 21.
    Land grab opportunityCompetitive Observe Orient Decide Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Launch AB Test Automatic Deploy Incremental Features Model Hypotheses INNOVATION CULTURE Measure Customers Continuous Delivery
  • 22.
    Land grab opportunityCompetitive Observe Orient Decide Measure Customers Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Launch AB Test Automatic Deploy Incremental Features Model Hypotheses INNOVATION CULTURE CLOUD Continuous Delivery
  • 23.
    Land grab opportunityCompetitive Observe Orient Decide Measure Customers Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Launch AB Test Automatic Deploy Incremental Features Model Hypotheses INNOVATION CULTURE CLOUD Continuous Delivery
  • 24.
    Land grab opportunityCompetitive Observe Orient Decide Measure Customers Act Move Customer Pain Point Analysis BIG DATA Plan Response JFDI Share Plans Launch AB Test Automatic Deploy Incremental Features Model Hypotheses INNOVATION CULTURE CLOUD Continuous Delivery
  • 25.
    Release Plan Developer Developer Developer Developer Developer QA Release Integration Ops Replace Old With New Release Monolithic service updates Works well with a small number of developers and a single language like php, java or ruby
  • 26.
    Release Plan Developer Developer Developer Developer Developer Monolithic service updates QA Release Integration Ops Replace Old With New Release Bugs Works well with a small number of developers and a single language like php, java or ruby
  • 27.
    Release Plan Developer Developer Developer Developer Developer Monolithic service updates QA Release Integration Ops Replace Old With New Release Bugs Bugs Works well with a small number of developers and a single language like php, java or ruby
  • 28.
  • 29.
    UX Dev AdmProd Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN
  • 30.
    UX Dev AdmProd Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN Product Team Using Monolithic Delivery Product Team Using Monolithic Delivery
  • 31.
    Product Team UsingMonolithic Delivery Product Team Using Monolithic Delivery UX Dev Adm Prod Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN Product Team Using Microservices Product Team Using Microservices Product Team Using Microservices
  • 32.
    Product Team UsingMonolithic Delivery Product Team Using Monolithic Delivery UX Dev Adm Prod Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN Product Team Using Microservices Product Team Using Microservices Platform Team Product Team Using Microservices
  • 33.
    Product Team UsingMonolithic Delivery Product Team Using Monolithic Delivery UX Dev Adm Prod Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN Product Team Using Microservices Platform Team A P I Product Team Using Microservices Product Team Using Microservices
  • 34.
    Product Team UsingMonolithic Delivery Product Team Using Monolithic Delivery UX Dev Adm Prod Mgr @adrianco Breaking Down the SILOs QA DBA Sys Adm Net Adm SAN Product Team Using Microservices Platform Team A P I Product Team Using Microservices Product Team Using Microservices DevOps is a Re-Org!
  • 35.
    Developer Developer Developer Developer Developer Old Release Still Running Release Plan Release Plan Release Plan Release Plan Immutable microservice deployment scales, is faster with large teams and diverse platform components
  • 36.
    Developer Developer Developer Developer Developer Immutable microservice deployment scales, is faster with large teams and diverse platform components Old Release Still Running Release Plan Release Plan Release Plan Release Plan Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production
  • 37.
    Developer Developer Developer Developer Developer Immutable microservice deployment scales, is faster with large teams and diverse platform components Old Release Still Running Release Plan Release Plan Release Plan Release Plan Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Bugs
  • 38.
    Developer Developer Developer Developer Developer Immutable microservice deployment scales, is faster with large teams and diverse platform components Old Release Still Running Release Plan Release Plan Release Plan Release Plan Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Bugs Deploy Feature to Production
  • 39.
    Configure Configure Developer Developer Developer Release Plan Release Plan Release Plan Standardized portable container deployment saves time and effort Deploy Standardized Services https://hub.docker.com
  • 40.
    Configure Configure Developer Developer Developer Release Plan Release Plan Release Plan Deploy Standardized Services Deploy Feature to Production Deploy Feature to Production Deploy Feature to Production Bugs Deploy Feature to Production Standardized portable container deployment saves time and effort https://hub.docker.com
  • 41.
    @adrianco Developing atthe Speed of Docker Developers • Compile/Build • Seconds Extend container • Package dependencies • Seconds PaaS deploy Containers • Docker startup • Seconds
  • 42.
    @adrianco Developing atthe Speed of Docker Developers • Compile/Build • Seconds Extend container • Package dependencies • Seconds PaaS deploy Containers • Docker startup • Seconds Speed is addictive, hard to go back to taking much longer to get things done
  • 43.
    @adrianco What Happened? Rate of change increased Cost and size and risk of change reduced
  • 44.
  • 45.
    Cloud Native Anew engineering challenge Construct a highly agile and highly available service from ephemeral and assumed broken components
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
    State of theArt in Cloud Native Microservice Architectures AWS Re:Invent : Asgard to Zuul https://www.youtube.com/watch?v=p7ysHhs5hl0 Resiliency at Massive Scale https://www.youtube.com/watch?v=ZfYJHtVL1_w Microservice Architecture https://www.youtube.com/watch?v=CriDUYtfrjs http://www.infoq.com/presentations/scale-gilt http://www.slideshare.net/mcculloughsean/itier-breaking-up-the-monolith-philly-ete http://www.infoq.com/presentations/Twitter-Timeline-Scalability http://www.infoq.com/presentations/twitter-soa http://www.infoq.com/presentations/Zipkin https://speakerdeck.com/mattheath/scaling-micro-services-in-go-highload-plus-plus-2014
  • 57.
    @adrianco Traditional vs.Cloud Native Storage Business Logic Database Master Fabric Storage Arrays Database Slave Fabric Storage Arrays
  • 58.
    @adrianco Traditional vs.Cloud Native Storage Business Logic Database Master Fabric Storage Arrays Database Slave Fabric Storage Arrays Business Logic Cassandra Zone A nodes Cassandra Zone B nodes Cassandra Zone C nodes Cloud Object Store Backups
  • 59.
    @adrianco Traditional vs.Cloud Native Storage Business Logic Database Master Fabric Storage Arrays Database Slave Fabric Storage Arrays Business Logic Cassandra Zone A nodes Cassandra Zone B nodes Cassandra Zone C nodes Cloud Object Store Backups SSDs inside arrays disrupt incumbent suppliers
  • 60.
    @adrianco Traditional vs.Cloud Native Storage Business Logic Database Master Fabric Storage Arrays Database Slave Fabric Storage Arrays Business Logic Cassandra Zone A nodes Cassandra Zone B nodes Cassandra Zone C nodes Cloud Object Store Backups SSDs inside ephemeral instances disrupt an entire industry SSDs inside arrays disrupt incumbent suppliers
  • 61.
    @adrianco Traditional vs.Cloud Native Storage Business Logic Database Master Fabric Storage Arrays Database Slave Fabric Storage Arrays Business Logic Cassandra Zone A nodes Cassandra Zone B nodes Cassandra Zone C nodes Cloud Object Store Backups SSDs inside ephemeral instances disrupt an entire industry SSDs inside arrays disrupt incumbent suppliers See also discussions about “Hyper-Converged” storage
  • 62.
    ● Edda -the “black box flight recorder” for configuration state ● Chaos Monkey - enforcing stateless business logic ● Chaos Gorilla - enforcing zone isolation/replication ● Chaos Kong - enforcing region isolation/replication ● Security Monkey - watching for insecure configuration settings ● See over 40 NetflixOSS projects at netflix.github.com ● Get “Technical Indigestion” trying to keep up with techblog.netflix.com @adrianco Trust with Verification
  • 63.
  • 64.
    Autoscaled Ephemeral Instancesat Netflix Largest services use autoscaled red/black code pushes Average lifetime of an instance is 36 hours Push Autoscale Up Autoscale Down
  • 65.
    Netflix Automatic CodeDeployment Canary Bad Signature Implemented by Simon Tuffs
  • 66.
    Netflix Automatic CodeDeployment Canary Bad Signature Implemented by Simon Tuffs
  • 67.
  • 68.
    @adrianco Speeding UpThe Platform Datacenter Snowflakes • Deploy in months • Live for years
  • 69.
    @adrianco Speeding UpThe Platform Datacenter Snowflakes • Deploy in months • Live for years Virtualized and Cloud • Deploy in minutes • Live for weeks
  • 70.
    @adrianco Speeding UpThe Platform Datacenter Snowflakes • Deploy in months • Live for years Virtualized and Cloud • Deploy in minutes • Live for weeks Docker Containers • Deploy in seconds • Live for minutes/hours
  • 71.
    @adrianco Speeding UpThe Platform Datacenter Snowflakes • Deploy in months • Live for years Virtualized and Cloud • Deploy in minutes • Live for weeks Docker Containers • Deploy in seconds • Live for minutes/hours AWS Lambda • Deploy in milliseconds • Live for seconds
  • 72.
    AWS Lambda •Deploy in milliseconds • Live for seconds @adrianco Speeding Up The Platform Datacenter Snowflakes • Deploy in months • Live for years Virtualized and Cloud • Deploy in minutes • Live for weeks Docker Containers • Deploy in seconds • Live for minutes/hours Speed enables and encourages new microservice architectures
  • 73.
    With AWS Lambda compute resources are charged by the 100ms, not the hour First 1,000,000 node.js executions/month are free First 400,000 GB-seconds of RAM-CPU are free
  • 74.
    Monitoring Requirements Metricresolution microseconds Metric update rate 1 second Metric to display latency less than human attention span (<10s)
  • 75.
    @adrianco Low LatencySaaS Based Monitors www.vividcortex.com and www.boundary.com
  • 76.
    Adrian’s Tinkering Projects Model and visualize microservices Simulate interesting architectures ! See github.com/adrianco/spigo Simulate Protocol Interactions in Go ! See github.com/adrianco/d3grow Dynamic visualization
  • 77.
  • 78.
    Capacity Optimization fora Single System Bottleneck Upper Spec Limit ! When demand probability exceeds USL by 4.0 sigma scale up resource to maintain low latency Lower Spec Limit ! When demand probability is below USL by 3.0 sigma scale down resource to save money Documentation on Capability Plots To get accurate high dynamic range histograms see http://hdrhistogram.org/ Slideshare: 2003 Presentation on Capacity Planning Methods See US Patent: 7467291
  • 79.
    But interesting systems don’t have a single bottleneck nowadays…
  • 80.
    But interesting systems don’t have a single bottleneck nowadays…
  • 81.
    @adrianco How isCost Measured?
  • 82.
    1 Bottom Up 2 Product 3 Top Down
  • 83.
    @adrianco Bottom UpCosts Add up the cost to buy and operate every component 1
  • 84.
    @adrianco Product Cost Cost of delivering and maintaining each product 2
  • 85.
    @adrianco Top DownCosts Divide total budget by the number of components 3
  • 86.
    @adrianco Top Downvs. Bottom Up Will never match! Hidden Subsidies vs. Hidden Costs 3 1
  • 87.
    @adrianco Agile TeamProduct Profit Value minus costs Time to value ROI, NPV, MMF Profit center 2 $
  • 88.
  • 89.
    @adrianco Cloud NativeCost Optimization Optimize for speed first Turn it off! Capacity on demand Consolidate and Reserve Plan for price cuts FOSS tooling $$ $
  • 90.
    @adrianco The Capacity Planning Problem
  • 91.
    @adrianco Best CaseWaste Product(Launch(Agility(2(Rightsized( Pre2Launch( Build2out( Tes9ng( Launch( Growth( Growth( Demand( Cloud( Datacenter( $( Cloud capacity used is maybe half average DC capacity
  • 92.
    @adrianco Failure toLaunch Product(Launch(-(Under-es1mated( Pre-Launch Build-out Testing Launch Growth Growth Mad scramble to add more DC capacity during launch phase outages
  • 93.
    @adrianco Over theTop Losses Product(Launch(Agility(–(Over6es8mated( Pre-Launch Build-out Testing Launch Growth Growth $ Capacity wasted on failed launch magnifies the losses
  • 94.
    @adrianco Turning offCapacity Off-peak production Test environments Dev out of hours When%you%turn%off%your%cloud%resources,% you%actually%stop%paying%for%them% Dormant Data Science
  • 95.
    @adrianco Containerize TestEnvironments Snapshot or freeze Fast restart needed Persistent storage 40 of 168 hrs/wk Bin-packed containers shippable.com saved 70%
  • 96.
    @adrianco Seasonal Savings 50% Savings 1 5 9 13 17 21 25 29 33 37 41 45 49 Web Servers Week Optimize during a year Weekly&CPU&Load&
  • 97.
    @adrianco Autoscale theCosts Away 50%+%Cost%Saving% Scale%up/down% by%70%+% Move%to%Load=Based%Scaling%
  • 98.
    @adrianco Daily DutyCycle Instances' Business'Throughput' Reactive Autoscaling saves around 50% Predictive Autoscaling saves around 70% See Scryer on Netflix Tech Blog
  • 99.
    @adrianco Underutilized andUnused AWS$Support$–$Trusted$Advisor$–$ Your$personal$cloud$assistant$
  • 100.
    @adrianco Clean Upthe Crud Other&simple&op-miza-on&-ps& • Don’t&forget&to…& – Disassociate&unused&EIPs& – Delete&unassociated&Amazon& EBS&volumes& – Delete&older&Amazon&EBS& snapshots& – Leverage&Amazon&S3&Object& Expira-on& & Janitor&Monkey&cleans&up&unused&resources&
  • 101.
    @adrianco Total Costof Oranges When%Comparing%TCO…! Make!sure!that! you!are!including! all!the!cost!factors! into!considera4on! Place% Power% Pipes% People% Pa6erns%
  • 102.
    @adrianco Total Costof Oranges When%Comparing%TCO…! Make!sure!that! you!are!including! all!the!cost!factors! into!considera4on! Place% Power% Pipes% People% Pa6erns% How much does datacenter automation software and support cost per instance?
  • 103.
    @adrianco When DoYou Pay? bill Run My Stuff Now Next Month Datacenter Up Front Costs Lease Building Ages Ago Install AC etc Rack & Stack Private Cloud SW
  • 104.
    Cost Model Comparisons AWS has most complex model • Both highest and lowest cost options! CPU/Memory Ratios Vary • Can’t get same config everywhere Features Vary • Local SSD included on some vendors, not others • Network and storage charges also vary
  • 105.
    @adrianco Digital OceanFlat Pricing Hourly Price ($0.06/hr) Monthly Price ($40/mo) $ No Upfront $ No Upfront $0.060/hr $0.056/hr $1555/36mo $1440/36mo Savings 7% Prices on Dec 7th, for 2 Core, 4G RAM, SSD, purely to show typical savings
  • 106.
    @adrianco Google SustainedUsage Full Price Without Sustained Usage Typical Sustained Usage Each Month Full Sustained Usage Each Month $ No Upfront $ No Upfront $ No Upfront $0.063/hr $0.049/hr $0.045/hr $1633/36mo $1270/36mo $1166/36mo Savings 22% 29% Prices on Dec 7th, for n1.standard-1 (1 vCPU, 3.75G RAM, no disk) purely to show typical savings
  • 107.
    @adrianco AWS Reservations On Demand No Upfront 1 year Partial Upfront 3 year All Upfront 3 year $ No Upfront $No Upfront $337 Upfront $687 Upfront $0.070/hr $0.050/hr $0.0278/hr $0.00/hr $1840/36mo $1314/36mo $731/36mo $687/36mo Savings 29% 60% 63% Prices on Dec 7th, for m3.medium (1 vCPU, 3.75G RAM, SSD) purely to show typical savings
  • 108.
    @adrianco Blended BenefitsMix$and$Match$Reserved$Types$and$On4Demand$ Instances( On8Demand Light&RI Light&RI Light&RI Light&RI Heavy&Utilization&Reserved Instances Days(of(Month( 12 10 8 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 On Demand Partial Upfront All Upfront
  • 109.
    @adrianco Consolidated CostCutting Consolidated+Billing:+Single+payer+for+a+group+of+ accounts+ • One$Bill+for+mul7ple+accounts+ • Easy$Tracking$of+account+ charges+(e.g.,+download+CSV+of+ cost+data)+ • Volume$Discounts+can+be+ reached+faster+with+combined+ usage+ • Reserved$Instances$are+shared+ across+accounts+(including+RDS+ Reserved+DBs)+
  • 110.
    @adrianco Production PriorityOver%Reserve(the(Produc0on(Environment( Produc0on(Env.( Total#Capacity# Account( 100#Reserved# QA/Staging(Env.( Account( 0#Reserved## Perf(Tes0ng(Env.( Account( 0#Reserved## Development(Env.( Account( 0#Reserved# Storage(Account( 0#Reserved#
  • 111.
    @adrianco Actual ReservationUsage Consolidated+Billing+Borrows+Unused+Reserva4ons+ Produc4on+Env.+ Total#Capacity# Account+ 68#Used# QA/Staging+Env.+ Account+ 10#Borrowed# Perf+Tes4ng+Env.+ Account+ 6#Borrowed## Development+Env.+ Account+ 12#Borrowed# Storage+Account+ 4#Borrowed#
  • 112.
    @adrianco Consolidated Reservations Burst capacity guarantee Higher availability with lower cost Other accounts soak up any extra Monthly billing roll-up Capitalize upfront charges! But: Fixed location and instance type
  • 113.
    @adrianco Re-sell Reservations Reserved'Instance'Marketplace' Buy$a$smaller$term$instance$ Buy$instance$with$different$OS$or$type$ Buy$a$Reserved$instance$in$different$region$ Sell$your$unused$Reserved$Instance$ Sell$unwanted$or$over;bought$capacity$ Further$reduce$costs$by$op>mizing$
  • 114.
    @adrianco Use EC2Spot Instances Cloud native dynamic autoscaled spot instances ! Real world total savings up to 50%
  • 115.
    @adrianco Right SizingInstances Fit the instance size to the workload
  • 116.
    @adrianco Technology Refresh Older m1 and m2 families • Slower CPUs • Higher response times • Smaller caches (6MB) • Oldest m1.xlarge • 15G/8.5ECU/35c 23ECU/$ • Old m2.xlarge • 17G/6.5ECU/25c 26ECU/$ New m3 family • Faster CPUs • Lower response times • Larger caches (20MB) • Java perf ratio > ECU • New m3.xlarge • 15G/13ECU/28c 46ECU/$ • 77% better ECU/$ • Deploy fewer instances
  • 117.
    @adrianco Data Sciencefor Free Follow%the%Customer%(Run%web%servers)%during%the%day% No.%of%Reserved% Instances% Follow%the%Money%(Run%Hadoop%clusters)%at%night% 16 14 12 10 8 6 4 2 0 Mon Tue Wed Thur Fri Sat Sun No#of#Instances#Running# Week Auto7Scaling7Servers Hadoop7Servers
  • 118.
    @adrianco Six Waysto Cut Costs Building#Cost>Aware#Cloud#Architectures# #1#Business#Agility#by#Rapid#Experimenta8on#=#Profit# #2#Business>driven#Auto#Scaling#Architectures#=#Savings## #3#Mix#and#Match#Reserved#Instances#with#On>Demand#=#Savings# #4#Consolidated#Billing#and#Shared#Reserva8ons#=#Savings# #5#Always>on#Instance#Type#Op8miza8on#=#Recurring#Savings# #6#Follow#the#Customer#(Run#web#servers)#during#the#day# Follow#the#Money#(Run#Hadoop#clusters)#at#night# Credit to Jinesh Varia of AWS for this summary
  • 119.
    Data shown ispurely illustrative @adrianco Expect Prices to Drop Three Years Halving Every 18mo = maybe 40% over-all savings 100 75 50 25 0 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12 1 2 3 4 5 6 7 8 9 10 11 12
  • 120.
  • 121.
    100 Traditional application using AWS heavy use reservations 30 30 25 @adrianco Lift and Shift Compounding 100 75 50 25 0 70 70 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts Base price is for capacity bought up-front
  • 122.
    100 Traditional application using AWS heavy use reservations 30 30 25 @adrianco Lift and Shift Compounding 100 75 50 25 0 70 70 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts Base price is for capacity bought up-front
  • 123.
    100 Traditional application using AWS heavy use reservations 30 30 25 @adrianco Lift and Shift Compounding 100 75 50 25 0 70 70 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts Base price is for capacity bought up-front
  • 124.
    100 Traditional application using AWS heavy use reservations 30 30 25 @adrianco Lift and Shift Compounding 100 75 50 25 0 70 70 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts Base price is for capacity bought up-front
  • 125.
    100 Cloud native application partially optimized light use reservations 20 15 25 @adrianco Conservative Compounding 100 75 50 25 0 35 50 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 126.
    100 Cloud native application partially optimized light use reservations 20 15 25 @adrianco Conservative Compounding 100 75 50 25 0 35 50 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 127.
    100 Cloud native application partially optimized light use reservations 20 15 25 @adrianco Conservative Compounding 100 75 50 25 0 35 50 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 128.
    100 Cloud native application partially optimized light use reservations 20 15 25 @adrianco Conservative Compounding 100 75 50 25 0 35 50 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 129.
    100 Cloud native application partially optimized light use reservations 20 15 25 @adrianco Conservative Compounding 100 75 50 25 0 35 50 70 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 130.
    100 Cloud nativeapplication fully optimized autoscaling mixed reservation use costs 4% of base price over three years! 12 8 6 4 @adrianco Agressive Compounding 100 75 50 25 0 25 50 Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts
  • 131.
    @adrianco Cost Monitoringand Optimization
  • 132.
    @adrianco Final Thoughts Turn off idle instances Clean up unused stuff Optimize for pricing model Assume prices will go down Go cloud native to be fast and save Complex dynamic control issues!
  • 133.
    @adrianco Further Reading ● Battery Ventures Blog http://www.battery.com/powered ● Adrian’s Blog http://perfcap.blogspot.com and Twitter @adrianco ● Slideshare http://slideshare.com/adriancockcroft ! ● Monitorama Opening Keynote Portland OR - May 7th, 2014 - Video available ● GOTO Chicago Opening Keynote May 20th, 2014 - Video available ● Qcon New York – Speed and Scale - June 11th, 2014 - Video available ● Structure - Cloud Trends - San Francisco - June 19th, 2014 - Video available ● GOTO Copenhagen/Aarhus – Denmark – Sept 25th, 2014 ● DevOps Enterprise Summit - San Francisco - Oct 21-23rd, 2014 - Videos available ● GOTO Berlin - Germany - Nov 6th, 2014 ● Dockercon Europe - Amsterdam - Microservices - December 4th, 2014 See www.battery.com for a list of portfolio investments