133
Cloud Native Cost Optimization Adrian Cockcroft @adrianco Technology Fellow - Battery Ventures UCC2014 Cloud Control Workshop - December 2014

Cloud Native Cost Optimization UCC

Embed Size (px)

Citation preview

Page 1: Cloud Native Cost Optimization UCC

Cloud Native Cost OptimizationAdrian Cockcroft @adrianco

Technology Fellow - Battery Ventures UCC2014 Cloud Control Workshop - December 2014

Page 2: Cloud Native Cost Optimization UCC

@adrianco

What does everyone want?

Page 3: Cloud Native Cost Optimization UCC

@adrianco

Less Time Less Cost

Page 4: Cloud Native Cost Optimization UCC

@adrianco

Faster !

See talks by @adrianco Speed and Scale - QCon New York Fast Delivery - GOTO Copenhagen

Page 5: Cloud Native Cost Optimization UCC

@adrianco

Cheaper !

This talk: How to use Cloud Native architecture to

reduce cost without slowing down

Page 6: Cloud Native Cost Optimization UCC

Speeding up Development Cloud Native Applications

Cost Optimization

Page 7: Cloud Native Cost Optimization UCC

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

Page 8: Cloud Native Cost Optimization UCC

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

2009

Page 9: Cloud Native Cost Optimization UCC

Why am I here?

%*&!”

By Simon Wardley http://enterpriseitadoption.com/

2009

Page 10: Cloud Native Cost Optimization UCC

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/

20142009

Page 11: Cloud Native Cost Optimization UCC

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/

20142009

Example: Docker wasn’t on anyone’s roadmap for 2014. It’s on everyone’s roadmap for 2015.

Page 12: Cloud Native Cost Optimization UCC

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 PeopleTinkering with

Technologies

Maintain Relationship with Cloud Vendors

Page 13: Cloud Native Cost Optimization UCC

Speeding Up Development

Page 14: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act Continuous Delivery

Page 15: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Measure Customers

Continuous Delivery

Page 16: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

INNOVATION

Measure Customers

Continuous Delivery

Page 17: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

Model Hypotheses

INNOVATION

Measure Customers

Continuous Delivery

Page 18: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

Model Hypotheses

BIG DATA

INNOVATION

Measure Customers

Continuous Delivery

Page 19: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Model Hypotheses

BIG DATA

INNOVATION

Measure Customers

Continuous Delivery

Page 20: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

Measure Customers

Continuous Delivery

Page 21: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

Measure Customers

Continuous Delivery

Page 22: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 23: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 24: Cloud Native Cost Optimization UCC

Observe

Orient

Decide

Act

Land grab opportunity Competitive

Move

Customer Pain Point

Analysis

JFDI

Plan Response

Share Plans

Incremental Features

Automatic Deploy

Launch AB Test

Model Hypotheses

BIG DATA

INNOVATION

CULTURE

CLOUD

Measure Customers

Continuous Delivery

Page 25: Cloud Native Cost Optimization UCC

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

Page 26: Cloud Native Cost Optimization UCC

Release Plan

Developer

Developer

Developer

Developer

Developer

QA Release Integration

Ops Replace Old With New

Release

Bugs

Monolithic service updates

Works well with a small number of developers and a single language like php, java or ruby

Page 27: Cloud Native Cost Optimization UCC

Release Plan

Developer

Developer

Developer

Developer

Developer

QA Release Integration

Ops Replace Old With New

Release

Bugs

Bugs

Monolithic service updates

Works well with a small number of developers and a single language like php, java or ruby

Page 28: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

Page 29: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

Mgr

Page 30: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

Mgr

Product Team Using Monolithic DeliveryProduct Team Using Monolithic Delivery

Page 31: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Product Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 32: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Platform TeamProduct Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 33: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct Team Using Microservices

Product Team Using Monolithic Delivery

Platform TeamA P IProduct Team Using Microservices

Product Team Using Microservices

Product Team Using Monolithic Delivery

Page 34: Cloud Native Cost Optimization UCC

@adrianco

Breaking Down the SILOs

QA DBA Sys Adm

Net Adm

SAN AdmDevUXProd

MgrProduct 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

Page 35: Cloud Native Cost Optimization UCC

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

Page 36: Cloud Native Cost Optimization UCC

Developer

Developer

Developer

Developer

Developer

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

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 37: Cloud Native Cost Optimization UCC

Developer

Developer

Developer

Developer

Developer

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

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 38: Cloud Native Cost Optimization UCC

Developer

Developer

Developer

Developer

Developer

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

Immutable microservice deployment scales, is faster with large teams and diverse platform components

Page 39: Cloud Native Cost Optimization UCC

Configure

Configure

Developer

Developer

Developer

Release Plan

Release Plan

Release Plan

Deploy Standardized

Services

Standardized portable container deployment saves time and effort

https://hub.docker.com

Page 40: Cloud Native Cost Optimization UCC

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

Page 41: Cloud Native Cost Optimization UCC

@adrianco

Developing at the Speed of Docker

Developers • Compile/Build • Seconds

Extend container • Package dependencies • Seconds

PaaS deploy Containers • Docker startup • Seconds

Page 42: Cloud Native Cost Optimization UCC

@adrianco

Developing at the Speed of Docker

Speed is addictive, hard to go back to taking much longer to get things done

Developers • Compile/Build • Seconds

Extend container • Package dependencies • Seconds

PaaS deploy Containers • Docker startup • Seconds

Page 43: Cloud Native Cost Optimization UCC

@adrianco

What Happened?Rate of change

increased

Cost and size and risk of change

reduced

Page 44: Cloud Native Cost Optimization UCC

Cloud Native Applications

Page 45: Cloud Native Cost Optimization UCC

Cloud NativeA new engineering challenge

Construct a highly agile and highly available service from ephemeral and

assumed broken components

Page 46: Cloud Native Cost Optimization UCC

Inspiration

Page 47: Cloud Native Cost Optimization UCC

Inspiration

Page 48: Cloud Native Cost Optimization UCC

Inspiration

Page 49: Cloud Native Cost Optimization UCC

Inspiration

Page 50: Cloud Native Cost Optimization UCC

Inspiration

Page 51: Cloud Native Cost Optimization UCC

Inspiration

Page 52: Cloud Native Cost Optimization UCC

Inspiration

Page 53: Cloud Native Cost Optimization UCC

Inspiration

Page 54: Cloud Native Cost Optimization UCC

Inspiration

Page 55: Cloud Native Cost Optimization UCC

Inspiration

Page 56: Cloud Native Cost Optimization UCC

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

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

Page 57: Cloud Native Cost Optimization UCC

@adrianco

Traditional vs. Cloud Native Storage

Business Logic

Database Master

Fabric

Storage Arrays

Database Slave

Fabric

Storage Arrays

Page 58: Cloud Native Cost Optimization UCC

@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

Page 59: Cloud Native Cost Optimization UCC

@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

Page 60: Cloud Native Cost Optimization UCC

@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

Page 61: Cloud Native Cost Optimization UCC

@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

Page 62: Cloud Native Cost Optimization UCC

@adrianco

● 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

Trust with Verification

Page 63: Cloud Native Cost Optimization UCC

Netflix Cloud Native Benchmark

Page 64: Cloud Native Cost Optimization UCC

Autoscaled Ephemeral Instances at Netflix

Largest services use autoscaled red/black code pushes

Average lifetime of an instance is 36 hoursPush

Autoscale UpAutoscale Down

Page 65: Cloud Native Cost Optimization UCC

Netflix Automatic Code Deployment Canary Bad Signature

Implemented by Simon Tuffs

Page 66: Cloud Native Cost Optimization UCC

Netflix Automatic Code Deployment Canary Bad Signature

Implemented by Simon Tuffs

Page 67: Cloud Native Cost Optimization UCC

@adrianco

Happy Canary Signature

Page 68: Cloud Native Cost Optimization UCC

@adrianco

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Page 69: Cloud Native Cost Optimization UCC

@adrianco

Speeding Up The Platform

Datacenter Snowflakes • Deploy in months • Live for years

Virtualized and Cloud • Deploy in minutes • Live for weeks

Page 70: Cloud Native Cost Optimization UCC

@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

Page 71: Cloud Native Cost Optimization UCC

@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

Page 72: Cloud Native Cost Optimization UCC

@adrianco

Speeding Up The Platform

Speed enables and encourages new microservice architectures

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

Page 73: Cloud Native Cost Optimization UCC

With AWS Lambda compute resources are charged

by the 100ms, not the hourFirst 1,000,000 node.js executions/month are free First 400,000 GB-seconds of RAM-CPU are free

Page 74: Cloud Native Cost Optimization UCC

Monitoring Requirements Metric resolution microseconds

Metric update rate 1 second Metric to display latency less than human

attention span (<10s)

Page 75: Cloud Native Cost Optimization UCC

@adrianco

Low Latency SaaS Based Monitors

www.vividcortex.com and www.boundary.com

Page 76: Cloud Native Cost Optimization UCC

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

Page 77: Cloud Native Cost Optimization UCC

Cost Optimization

Page 78: Cloud Native Cost Optimization UCC

See US Patent: 7467291Slideshare: 2003 Presentation on Capacity Planning Methods

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

To get accurate high dynamic range histograms see http://hdrhistogram.org/

Documentation on Capability Plots

Page 79: Cloud Native Cost Optimization UCC

But interesting systems don’t have a single

bottleneck nowadays…

Page 80: Cloud Native Cost Optimization UCC

But interesting systems don’t have a single

bottleneck nowadays…

Page 81: Cloud Native Cost Optimization UCC

@adrianco

How is Cost Measured?

Page 82: Cloud Native Cost Optimization UCC

1

Bottom Up

2

Product

3

Top Down

Page 83: Cloud Native Cost Optimization UCC

@adrianco

Bottom Up Costs

Add up the cost to buy and operate every component

1

Page 84: Cloud Native Cost Optimization UCC

@adrianco

Product Cost

Cost of delivering and maintaining each product

2

Page 85: Cloud Native Cost Optimization UCC

@adrianco

Top Down Costs

Divide total budget by the number of components

3

Page 86: Cloud Native Cost Optimization UCC

@adrianco

Top Down vs. Bottom Up

Will never match! Hidden Subsidies vs. Hidden Costs

1

3

Page 87: Cloud Native Cost Optimization UCC

@adrianco

Agile Team Product Profit

Value minus costs Time to value ROI, NPV, MMF Profit center

2$

Page 88: Cloud Native Cost Optimization UCC

@adrianco

What about cloud costs?

Page 89: Cloud Native Cost Optimization UCC

@adrianco

Cloud Native Cost Optimization

Optimize for speed first Turn it off! Capacity on demand Consolidate and Reserve Plan for price cuts FOSS tooling

$ $ $

Page 90: Cloud Native Cost Optimization UCC

@adrianco

The Capacity Planning Problem

Page 91: Cloud Native Cost Optimization UCC

@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

Page 92: Cloud Native Cost Optimization UCC

@adrianco

Failure to LaunchProduct(Launch(-(Under-es1mated(

Pre-L

aunc

h

Build-

out

Testi

ng

Laun

ch

Growth

Growth

Mad scramble to add more DC capacity during launch phase outages

Page 93: Cloud Native Cost Optimization UCC

@adrianco

Over the Top LossesProduct(Launch(Agility(–(Over6es8mated(

Pre-L

aunc

h

Build-

out

Testi

ng

Laun

ch

Growth

Growth

$

Capacity wasted on failed launch magnifies the losses

Page 94: Cloud Native Cost Optimization UCC

@adrianco

Turning off Capacity

Off-peak production Test environments Dev out of hours Dormant Data ScienceWhen%you%turn%off%your%cloud%resources,%

you%actually%stop%paying%for%them%

Page 95: Cloud Native Cost Optimization UCC

@adrianco

Containerize Test Environments

Snapshot or freeze Fast restart needed Persistent storage 40 of 168 hrs/wk Bin-packed containers shippable.com saved 70%

Page 96: Cloud Native Cost Optimization UCC

@adrianco

Seasonal Savings

1 5 9 13 17 21 25 29 33 37 41 45 49

Web

Ser

vers

Week

Optimize during a year

50% Savings Weekly&CPU&Load&

Page 97: Cloud Native Cost Optimization UCC

@adrianco

Autoscale the Costs Away

50%+%Cost%Saving%Scale%up/down%

by%70%+%

Move%to%Load=Based%Scaling%

Page 98: Cloud Native Cost Optimization UCC

@adrianco

Daily Duty Cycle

Busine

ss'Throu

ghpu

t'Instan

ces'

Reactive Autoscaling saves around 50%

Predictive Autoscaling saves around 70% See Scryer on Netflix Tech Blog

Page 99: Cloud Native Cost Optimization UCC

@adrianco

Underutilized and UnusedAWS$Support$–$Trusted$Advisor$–$

Your$personal$cloud$assistant$

Page 100: Cloud Native Cost Optimization UCC

@adrianco

Clean Up the CrudOther&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&

Page 101: Cloud Native Cost Optimization UCC

@adrianco

Total Cost of OrangesWhen%Comparing%TCO…!

Make!sure!that!you!are!including!all!the!cost!factors!into!considera4on!

Place%Power%Pipes%People%Pa6erns%

Page 102: Cloud Native Cost Optimization UCC

@adrianco

Total Cost of OrangesWhen%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?

Page 103: Cloud Native Cost Optimization UCC

@adrianco

When Do You Pay?

@adrianco

bill

NowNext

MonthAges Ago

Lease Building

Install AC etc

Rack & Stack

Private Cloud SW

Run My Stuff

Datacenter Up Front Costs

Page 104: Cloud Native Cost Optimization UCC

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

Page 105: Cloud Native Cost Optimization UCC

@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

Page 106: Cloud Native Cost Optimization UCC

@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

Page 107: Cloud Native Cost Optimization UCC

@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

Page 108: Cloud Native Cost Optimization UCC

@adrianco

Blended BenefitsMix$and$Match$Reserved$Types$and$On4Demand$

Instan

ces(

Days(of(Month(

0

2

4

6

8

10

12

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

Heavy&Utilization&Reserved Instances

Light&RI Light&RILight&RILight&RI

On8Demand

All Upfront

Partial Upfront

On Demand

Page 109: Cloud Native Cost Optimization UCC

@adrianco

Consolidated Cost CuttingConsolidated+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)+

Page 110: Cloud Native Cost Optimization UCC

@adrianco

Production PriorityOver%Reserve(the(Produc0on(Environment(

Produc0on(Env.(Account( 100#Reserved#

QA/Staging(Env.(Account( 0#Reserved##

Perf(Tes0ng(Env.(Account( 0#Reserved##

Development(Env.(Account( 0#Reserved#

Storage(Account( 0#Reserved#

Total#Capacity#

Page 111: Cloud Native Cost Optimization UCC

@adrianco

Actual Reservation UsageConsolidated+Billing+Borrows+Unused+Reserva4ons+

Produc4on+Env.+Account+ 68#Used#

QA/Staging+Env.+Account+ 10#Borrowed#

Perf+Tes4ng+Env.+Account+ 6#Borrowed##

Development+Env.+Account+ 12#Borrowed#

Storage+Account+ 4#Borrowed#

Total#Capacity#

Page 112: Cloud Native Cost Optimization UCC

@adrianco

Consolidated ReservationsBurst 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

Page 113: Cloud Native Cost Optimization UCC

@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$

Page 114: Cloud Native Cost Optimization UCC

@adrianco

Use EC2 Spot Instances

Cloud native dynamic autoscaled spot instances !Real world total savings up to 50%

Page 115: Cloud Native Cost Optimization UCC

@adrianco

Right Sizing InstancesFit the instance size to the workload

Page 116: Cloud Native Cost Optimization UCC

@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

Page 117: Cloud Native Cost Optimization UCC

@adrianco

Data Science for Free

Follow%the%Customer%(Run%web%servers)%during%the%day%

Follow%the%Money%(Run%Hadoop%clusters)%at%night%

0

2

4

6

8

10

12

14

16

Mon Tue Wed Thur Fri Sat Sun

No#of#Instan

ces#R

unning#

Week

Auto7Scaling7Servers

Hadoop7Servers

No.%of%Reserved%Instances%

Page 118: Cloud Native Cost Optimization UCC

@adrianco

Six Ways to Cut Costs#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#

Building#Cost>Aware#Cloud#Architectures#

#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

Page 119: Cloud Native Cost Optimization UCC

@adrianco

Expect Prices to DropThree Years Halving Every 18mo = maybe 40% over-all savings

0

25

50

75

100

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

Data shown is purely illustrative

Page 120: Cloud Native Cost Optimization UCC

@adrianco

Compounded Savings

Page 121: Cloud Native Cost Optimization UCC

@adrianco

Lift and Shift Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

253030

707070

100 Traditional application using AWS heavy use reservations

Base price is for capacity bought up-front

Page 122: Cloud Native Cost Optimization UCC

@adrianco

Lift and Shift Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

253030

707070

100 Traditional application using AWS heavy use reservations

Base price is for capacity bought up-front

Page 123: Cloud Native Cost Optimization UCC

@adrianco

Lift and Shift Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

253030

707070

100 Traditional application using AWS heavy use reservations

Base price is for capacity bought up-front

Page 124: Cloud Native Cost Optimization UCC

@adrianco

Lift and Shift Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

253030

707070

100 Traditional application using AWS heavy use reservations

Base price is for capacity bought up-front

Page 125: Cloud Native Cost Optimization UCC

@adrianco

Conservative Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

15202535

50

70

100 Cloud native application partially optimized light use reservations

Page 126: Cloud Native Cost Optimization UCC

@adrianco

Conservative Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

15202535

50

70

100 Cloud native application partially optimized light use reservations

Page 127: Cloud Native Cost Optimization UCC

@adrianco

Conservative Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

15202535

50

70

100 Cloud native application partially optimized light use reservations

Page 128: Cloud Native Cost Optimization UCC

@adrianco

Conservative Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

15202535

50

70

100 Cloud native application partially optimized light use reservations

Page 129: Cloud Native Cost Optimization UCC

@adrianco

Conservative Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

15202535

50

70

100 Cloud native application partially optimized light use reservations

Page 130: Cloud Native Cost Optimization UCC

@adrianco

Agressive Compounding

0

25

50

75

100

Base Price Rightsized Seasonal Daily Scaling Reserved Tech Refresh Price Cuts

4681225

50

100 Cloud native application fully optimized autoscaling mixed reservation use costs 4% of base price over three years!

Page 131: Cloud Native Cost Optimization UCC

@adrianco

Cost Monitoring and Optimization

Page 132: Cloud Native Cost Optimization UCC

@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!

Page 133: Cloud Native Cost Optimization UCC

@adrianco

Further Reading

See www.battery.com for a list of portfolio investments

● 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