5 ways you can build cost-awareness into your cloud architectures and maximize your savings (business-driven auto scaling, mixing and matching reserved/on-demand, iterating and optimizing fungible resources, follow the customer (run auto scaling web servers) during the day and follow the money (run hadoop and transcoding jobs) at night and soak up your reservations.
3. Cloud Economics – Agile ROI
Get a faster Return by Speeding up Investment
Observe
Act Orient
Rapid innovation by
speeding up the Decide
OODA loop
Try, fail, try again, succeed
4. « Want to increase innovation?
Lower the cost of failure »
Joi Ito
5. Experiment Often & Adapt Quickly
• Cost of failure falls dramatically
• Return on (small incremental)
Investments is high
• More risk taking, more innovation
• More iteration, faster innovation
8. Netflix Examples
• Brazilian Proxy Experiment
• No employees in Brazil, no “meetings with IT”
• Deployed instances into two zones in AWS Brazil
• Experimented with network proxy optimization
• Decided that gain wasn’t enough, shut everything down
• European Launch using AWS Ireland
• No employees in Ireland, no provisioning delay, everything worked
• No need to do detailed capacity planning
• Over-provisioned on day 1, shrunk to fit after a few days
• Capacity grows as needed for additional country launches
15. www.MyWebSite.com
(dynamic data)
Amazon Route 53
media.MyWebSite.com
(DNS)
(static data)
Elastic Load
Balancer
Amazon
Auto Scaling group : Web Tier CloudFront
Amazon EC2
Auto Scaling group : App Tier
Amazon RDS Amazon Amazon S3
RDS
Availability Zone #1
Availability Zone #2
16. Hourly CPU Load
14
12
10
8
Load
6 25% Savings
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
24 Hours in a
Day
Optimize by the time of day
17. Web Servers 50% Savings Weekly CPU Load
1 5 9 13 17 21 25 29 33 37 41 45 49
Weeks in a Year
Optimize during a year
18. Architectures that follows the money
How your architecture scales ∝ Customer Traffic
How your architecture scales ∝ How you make money
19. Mastering the Trade-offs
How many $/customer are you willing to spend for
50% better latency to customers that will
increase in conversion to paid customers (or
more signups) by 10%?
How many $/customer are you willing to spend for
100 more renders per minute (10% reduction in
wait time for customers) resulting in 50% more
reach (viral awareness)?
How many $/job are you willing to spend for 30%
more faster results for your analytics job?
20. Netflix’s use of Custom Metrics
Business
SLAs
Requests
Your User Timeout
PUT 2 weeks
App Latency
Resp time
Concurrent Alarm
Amazon CloudWatch
Users
Instance
Custom
Metrics
via Servo
“Increase, Decrease, Shrink, Expand your Instances ”
25. Cost and
wasted wasted
Demand capacity capacity
600k
Maintaining
on-premise
infrastructure wasted
capacity
for peak 300k
demand is wasted
lost
customers, order
ed hardware
expensive capacity
200k
Capacity of resources
Actual demand
Q1 Q2 Q3 Q4 Q1
Time
26. When Comparing TCO…
Place
Make sure that Power
you are including
Pipes
all the cost factors
into consideration People
Patterns
27. Save more when you reserve
On-demand Reserved Spot
Dedicated Instances
Instances Instances Instances
• Pay as you go • One time low • Requested Bid • Standard and
upfront fee + Price and Pay as Reserved
discounted hourly you go • Multi-Tenant
costs • Price change Single Customer
• Zero commitment
• Upto 71% savings every hour based • Ideal for
over On-Demand on unused EC2 compliance and
capacity regulatory
workloads
Billing Options
28. Business-aligned Architectures = Savings
Free Offering Premium Offering
• Optimize for reducing cost Optimized for Faster response times
• Acceptable Delay Limits No Delays
Implementation Implementation
• Use Spot Instances first Paid Subscriptions ∝ RIs
• Use on-demand Instances, if Use on-demand Instances during
Spot is not available in 15 min weekends (high traffic)
Bid higher in spot if On-Demand is
not available
29. Save more when you reserve
On-demand Reserved
Instances Instances Light
Utilization RI
• Pay as you go • One time low
upfront fee + 1-year and Medium
discounted 3-year terms Utilization RI
hourly costs
• Zero Heavy
commitment • Upto 71% Utilization RI
savings over On-
Demand
30. Break-even point
Utilization Ideal For Savings over
(Uptime) On-Demand
d
s 10% - 40% Disaster Recovery
ow
Light
Utilization RI
(>3.5 < 5.5
months/year)
(Lowest Upfront) 56%
+ 40% - 75% Standard Reserved
1-year and 3-
year terms
Medium
Utilization RI
(>5.5 < 7 months/year) Capacity 66%
s >75% Baseline Servers
Heavy
Utilization RI
(>7 months/year) (Lowest Total Cost) 71%
r On-
31. Mix and Match Reserved Types and On-Demand
12
10
On-Demand
8
Instances
6
Light RI Light RI Light RI Light RI
4
2
Heavy Utilization Reserved Instances
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
Days of Month
32. Netflix Concept of Reserving Capacity for Maximum Savings
Occasional Spikes On-Demand On-Demand
Heavy RI Heavy RI
Normal Usage Light RI Light RI
Billing Billing
us-west region us-east region
33. Netflix Concept of Reserving Capacity for Maximum Savings
Occasional Spikes On-Demand On-Demand
Heavy RI Light RI
Normal Usage Heavy RI Light RI
Billing Billing
us-west region us-east region
34. Key Takeaways on Cost-Aware Architectures….
#1 Business Agility by Rapid Experimentation = Increased Revenue
#2 Business-driven Auto Scaling Architectures = Savings
#3 Mix and Match Reserved Instances with On-Demand = Savings
35. Usage Patterns: Variety of Applications and Environments
Every Company has…. Every Application has….
LOB and Products Production Fleet
Fleet
Dev Fleet
Marketing Site Test Fleet
Intranet Site Staging/QA
BI and DW Perf Fleet
CRM DR Site
Training Sites
36. Consolidated Billing: Single payer for a group of
accounts
One Bill for multiple 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)
37. Over-Reserve the Production Environment
Total Capacity
Production Env.
100 Reserved
Account
QA/Staging Env.
0 Reserved
Account
Perf Testing Env.
0 Reserved
Account
Development
Env. 0 Reserved
Account
Storage Account 0 Reserved
38. Consolidated Billing Borrows Unused Reservations
Total Capacity
Production Env.
68 Used
Account
QA/Staging Env.
10 Borrowed
Account
Perf Testing Env.
6 Borrowed
Account
Development
Env. 12 Borrowed
Account
Storage Account 4 Borrowed
39. Consolidated Billing Advantages
• Production account is guaranteed to get burst capacity
• Reservation is higher than normal usage level
• Requests for more capacity always work up to reserved limit
• Higher availability for handling unexpected peak demands
• No additional cost
• Other lower priority accounts soak up unused reservations
• Totals roll up in the monthly billing cycle
40. Key Takeaways on Cost-Aware Architectures….
#1 Business Agility by Rapid Experimentation = Increased Revenue
#2 Business-driven Auto Scaling Architectures = Savings
#3 Mix and Match Reserved Instances with On-Demand = Savings
#4 Consolidated Billing and Shared Reservations = Savings
41. Continuous optimization in your
architecture results in
recurring savings
as early as your next month’s bill
42. Right-size your cloud: Use only what you need
An instance type
for every purpose
Assess your
memory & CPU
requirements
• Fit your
application to
the resource
• Fit the resource
to your
application
Only use a larger
instance when
needed
43. Reserved Instance Marketplace
Buy a smaller term instance Sell your unused Reserved Instance
Buy instance with different OS or type Sell unwanted or over-bought capacity
Buy a Reserved instance in different region Further reduce costs by optimizing
44. Instance Type Optimization
Older m1 and m2 families Latest m3 family
Slower CPUs Faster CPUs (Sandybridge)
Higher response times Lower response times
Smaller caches (6MB) Bigger caches (20MB)
Oldest m1.xl 15GB/8ECU/$0.48 Even faster for Java vs. ECU
Old m2.xl 17GB/6.5ECU/$0.41 New m3.xl 15GB/13 ECU/$0.50
~16 ECU/$/hr 26 ECU/$/hr – 62% better!
Java measured even higher
Deploy fewer instances
45. Key Takeaways on Cost-Aware Architectures….
#1 Business Agility by Rapid Experimentation = Increased Revenue
#2 Business-driven Auto Scaling Architectures = Savings
#3 Mix and Match Reserved Instances with On-Demand = Savings
#4 Consolidated Billing and Shared Reservations = Savings
#5 Always-on Instance Type Optimization = Recurring Savings
46.
47. Follow the Customer (Run web servers) during the day
16
14
No. of Reserved
Instances
No of Instances Running
12
10
8
Auto Scaling Servers
6 Hadoop Servers
4
2
0
Mon Tue Wed Thur Fri Sat Sun
Week
Follow the Money (Run Hadoop clusters) at night
48. Total
Instances
Reserved
Table
14 Types 4 AZ-mappings
Web Launch 40
Unused Hadoop
Application Reservations Fleet
Fleet Calculator
Total Instances
Running now = 100
Total unused Reservations
available = 40 in 2 AZs
(5 min interval)
49. Soaking up unused reservations
Unused reserved instances is published as a metric
Netflix Data Science ETL Workload (Starts after midnight)
• Daily business metrics roll-up
• EMR clusters started using hundreds of instances
Netflix Movie Encoding Workload
• Long queue of high and low priority encoding jobs
• Can soak up 1000’s of additional unused instances
50. Building Cost-Aware Cloud Architectures
#1 Business Agility by Rapid Experimentation = Increased Revenue
#2 Business-driven Auto Scaling Architectures = Savings
#3 Mix and Match Reserved Instances with On-Demand = Savings
#4 Consolidated Billing and Shared Reservations = Savings
#5 Always-on Instance Type Optimization = Recurring Savings
#6 Follow the Customer (Run web servers) during the day
Follow the Money (Run Hadoop clusters) at night
51. Thank you!
Jinesh Varia and Adrian Cockcroft
jvaria@amazon.com @jinman
acockcroft@netflix.com @adrianco
Notes de l'éditeur
Small incremental investments and faster returns gives you an opportunity to innovate quickly
In the old world, Cost of failure is too high,People are afraid to take risks, Innovation suffersTurns out that - we have to be wrong a lot in order to right a lotCloud really helps you to reduce the cost of failure and rapidly iteratingHow many big ticket technology idea can your budget tolerate?
In the cloud world, the cost of failure falls dramatically. One of the greatest value proposition You can launching multiple environments in parallel, Just yesterday, I was extremely curious about Play2 framework and whether it will support by new idea, I spun up 3 parallel environments one with a different database flavor to it, and when I was done and know which one I wanted, I was able to kill the other two and run quickly.
Turn ideas into businesses quickly, gain competitve advantage and releasing your products quickly and not only increasing revenue but also market share.
One of the greatest value proposition is you can start out small risk-free and commitment free with on-demand resources (because you have no clue how your app is going to perform and how much capacity you will need initially) and as you usage grows and you learn about traffic pattern, you reduce your costs by reserving capacity. Dropship your application to new geographies.Since we’ve invested in facilities around the world, we can offer you global reach at a moment’s notice. It’s cost prohibitive to put your own data center where all your customers are, but with AWS, you get the benefit without having to make the huge investment.
Only happens in the cloud
Shrink your server fleet from 6 to 2 at night and bring back
Build websites that sleep at night. Build machines only live when you need it
Our strategy of pricing each service independently gives you tremendous flexibility to choose the services you need for each project and to pay only for what you use
Personal Optimization Assistant
Netflix now serves 2x the customer traffic with the same amount of AWS resources as deployed 10 months ago
Reduced TCO remains one of the core reasons why customers choose the AWS cloud. However, there are a number of other benefits when you choose AWS, such as reduced time to market and increased business agility, which cannot be overlooked.
They have 2 offerings: free and premium. The free case they want to minimize cost. They have the ability to have some delay in the service while they transcode the data. So, they set a maximum of $x on the amount they would pay for an hour, and use Spot for the task. If they haven’t gotten capacity in a long time, they choose to start in On-Demand. The premium case they want the media encoding to happen immediately. So, they purchase Reserved Instances to optimize their expected level of demand (note breakeven is around 30% utilization, so buying more RIs may make sense). Then, they use On-Demand for elasticity. If they can’t get the On-Demand when they need it, they try in Spot (e.g. you can get capacity not available anywhere else). In all, they have optimized for their SLA for the premium offering, and minimized cost in their free offering. Both are legitimate scenarios, and AWS is the only provider to support the pricing models to allow them to do it.
No Enterprise has only Steady State Workloads.In fact, no system is entirely steady state.
You should use Consolidated Billing for any of the following scenarios:You have multiple accounts today and want to get a single bill and track each account's charges (e.g., you might have multiple projects, each with its own AWS account).You have multiple cost centers to track.You've acquired a project or company that has its own existing AWS account and you want to consolidate it on the same bill with your other AWS accounts.
You should use Consolidated Billing for any of the following scenarios:You have multiple accounts today and want to get a single bill and track each account's charges (e.g., you might have multiple projects, each with its own AWS account).You have multiple cost centers to track.You've acquired a project or company that has its own existing AWS account and you want to consolidate it on the same bill with your other AWS accounts.
You should use Consolidated Billing for any of the following scenarios:You have multiple accounts today and want to get a single bill and track each account's charges (e.g., you might have multiple projects, each with its own AWS account).You have multiple cost centers to track.You've acquired a project or company that has its own existing AWS account and you want to consolidate it on the same bill with your other AWS accounts.
Cloud is highly cost-effective because you can turn off and stop paying for it when you don’t need it or your users are not accessing. Build websites that sleep at night