Cloud Native Cost Optimization
Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures ICPE - Austin, February 2015
Cloud Native Cost Optimization Adrian Cockcroft @adrianco - - PowerPoint PPT Presentation
Cloud Native Cost Optimization Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures ICPE - Austin, February 2015 Why Does Performance Matter? @adrianco Latency Efficiency @adrianco Users: Response Latency Developers: Release
Cloud Native Cost Optimization
Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures ICPE - Austin, February 2015
Why Does Performance Matter?
Latency Efficiency
Users: Response Latency Developers: Release Latency Operators: Efficiency
Faster Delivery
Speed and Scale - QCon New York Fast Delivery - GOTO Copenhagen
Cheaper
How to use Cloud Native architecture to reduce cost without slowing down releases
Speeding up Development Cloud Native Applications Cost Optimization
Why am I here?
%*&!” By Simon Wardley http://enterpriseitadoption.com/Why am I here?
%*&!” By Simon Wardley http://enterpriseitadoption.com/2009
Why am I here?
%*&!” By Simon Wardley http://enterpriseitadoption.com/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
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 2014 Example: Docker wasn’t on anyone’s roadmap for 2014. It’s
for 2015.
What does @adrianco do?
@adrianco
Technology Due Diligence on Deals Presentations at Conferences Presentations at Companies Technical Advice for Portfolio Companies Program Committee for Conferences Networking with Interesting People Tinkering with Technologies Maintain Relationship with Cloud VendorsSpeeding Up Development
I NNOVATI ON
Measure Customers Continuous DeliveryI NNOVATI ON
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON CULTURE
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON CULTURE
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON CULTURE CLOUD
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON CULTURE CLOUD
Measure Customers Continuous DeliveryBI G DATA I NNOVATI ON CULTURE CLOUD
Measure Customers Continuous DeliveryMonolithic service updates Works well with a small number
language like php, java or ruby
Monolithic service updates Works well with a small number
language like php, java or ruby
Monolithic service updates Works well with a small number
language like php, java or ruby
Breaking Down the SILOs
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Product Team Using Monolithic Delivery Product Team Using Monolithic Delivery
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Product Team Using Microservices Product Team Using Monolithic Delivery Product Team Using Microservices Product Team Using Microservices Product Team Using Monolithic Delivery
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Product Team Using Microservices Product Team Using Monolithic Delivery Platform Team Product Team Using Microservices Product Team Using Microservices Product Team Using Monolithic Delivery
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Product Team Using Microservices Product Team Using Monolithic Delivery Platform Team
A P IProduct Team Using Microservices Product Team Using Microservices Product Team Using Monolithic Delivery
Breaking Down the SILOs
QA DBA Sys Adm Net Adm SAN Adm Dev UX Prod Mgr
Product Team Using Microservices Product Team Using Monolithic Delivery Platform Team
DevOps is a Re-Org!
A P IProduct Team Using Microservices Product Team Using Microservices Product Team Using Monolithic Delivery
Immutable microservice deployment scales, is faster with large teams and diverse platform components
Immutable microservice deployment scales, is faster with large teams and diverse platform components
Immutable microservice deployment scales, is faster with large teams and diverse platform components
Immutable microservice deployment scales, is faster with large teams and diverse platform components
Standardized portable container deployment saves time and effort
https://hub.docker.com mStandardized portable container deployment saves time and effort
https://hub.docker.com mDeveloping at the Speed of Docker
DevelopersDeveloping at the Speed of Docker
Speed is addictive, hard to go back to taking much longer to get things done
DevelopersWhat 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
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=CriDUYtfrjsTrust with Verification
Autoscaled Ephemeral Instances at Netflix
Largest services use autoscaled red/ black code pushes Average lifetime of an instance is 36 hours
P u s h
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
Happy Canary Signature
Speeding Up The Platform
Datacenter SnowflakesSpeeding Up The Platform
Datacenter SnowflakesSpeeding Up The Platform
Datacenter SnowflakesSpeeding Up The Platform
Datacenter SnowflakesSpeeding Up The Platform
Speed enables and encourages new microservice architectures
Datacenter SnowflakesWith 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)
Low Latency SaaS Based Monitors
www.vividcortex.com and www.boundary.comAdrian’s Tinkering Projects
Model and visualize microservices Simulate interesting architectures
Simulate Protocol Interactions in Go
Dynamic visualization
Cost Optimization
Capacity Optimization for a Single System Bottleneck
Upper Spec Limit
probability exceeds USL by 4.0 sigma scale up resource to maintain low latency Lower Spec Limit
probability is below USL by 3.0 sigma scale down resource to save money
To get accurate high dynamic range histograms see http://hdrhistogram.org/ Documentation on Capability PlotsBut interesting systems don’t have a single bottleneck nowadays…
But interesting systems don’t have a single bottleneck nowadays…
What about cloud costs?
Cloud Native Cost Optimization Optimize for speed first Turn it off! Capacity on demand Consolidate and Reserve Plan for price cuts FOSS tooling
The Capacity Planning Problem
Best Case Waste
used is maybe half average DC capacity
Failure to Launch
Mad scramble to add more DC capacity during launch phase
Over the Top Losses
$
Capacity wasted
magnifies the losses
Turning off Capacity
Off-peak production Test environments Dev out of hours Dormant Data Science
Containerize Test Environments
Snapshot or freeze Fast restart needed Persistent storage 40 of 168 hrs/ wk Bin-packed containers shippable.com saved 70%
Seasonal Savings
1 5 9 13 17 21 25 29 33 37 41 45 49 Web Servers Week50% Savings
Autoscale the Costs Away
Daily Duty Cycle
saves around 50% Predictive Autoscaling saves around 70% See Scryer on Netflix Tech Blog
Underutilized and Unused
Clean Up the Crud
– –
Total Cost of Oranges
Total Cost of Oranges
datacenter automation software and support cost per instance?
When Do You Pay?
@adriancobill Now Next Month Ages Ago Lease Building Install AC etc Rack & Stack Private Cloud SW Run My Stuff Datacenter Up Front Costs
Cost Model Comparisons
AWS has most complex model
CPU/ Memory Ratios Vary
Features Vary
Digital Ocean Flat Pricing
H ourly Price ($0.06/ hr) M onthly 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 savingsGoogle Sustained Usage
Full Price W ithout Sustained Usage Typical Sustained Usage Each M onth Full Sustained Usage Each M onth$ 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 savingsAWS 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 savingsBlended Benefits
Partial Upfront On Demand
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
Use EC2 Spot Instances
Cloud native dynamic autoscaled spot instances
savings up to 50%
Right Sizing Instances
Fit the instance size to the workload
Six Ways to Cut Costs
Compounded Savings
Lift and Shift Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts25 30 30 70 70 70 100
Traditional application using AWS heavy use reservations
Base price is for capacity bought up-front
Lift and Shift Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts25 30 30 70 70 70 100
Traditional application using AWS heavy use reservations
SeasonalBase price is for capacity bought up-front
Lift and Shift Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts25 30 30 70 70 70 100
Traditional application using AWS heavy use reservations
Seasonal Daily ScalingBase price is for capacity bought up-front
Lift and Shift Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts25 30 30 70 70 70 100
Traditional application using AWS heavy use reservations
Seasonal Daily Scaling Tech RefresBase price is for capacity bought up-front
Conservative Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts15 20 25 35 50 70 100
Cloud native application partially optimized light use reservations
Conservative Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts15 20 25 35 50 70 100
Cloud native application partially optimized light use reservations
Conservative Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts15 20 25 35 50 70 100
Cloud native application partially optimized light use reservations
Conservative Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts15 20 25 35 50 70 100
Cloud native application partially optimized light use reservations
Conservative Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts15 20 25 35 50 70 100
Cloud native application partially optimized light use reservations
Agressive Compounding
25 50 75 100
Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts4 6 8 12 25 50 100
Cloud native application fully optimized autoscaling mixed reservation use costs 4% of base price
4
Cost Monitoring and Optimization
@adrianFinal 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!
Any Questions?
Disclosure: some of the companies mentioned may be Battery Ventures Portfolio Companies See www.battery.com for a list of portfolio investments