8. 25% Savings
Web Servers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Hour
during a day
9. 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 S3
Amazon
Availability Zone #1 RDS
Availability Zone #2
10. Auto scaling : Types of Scaling
Scaling by Schedule
Use Scheduled Actions in Auto Scaling Service
• Date
• Time
• Min and Max of Auto Scaling Group Size
You can create up to 125 actions, scheduled up to 31 days into the
future, for each of your auto scaling groups. This gives you the ability
to scale up to four times a day for a month.
Scaling by Policy
Scaling up Policy - Double the group size
Scaling down Policy - Decrement by 1
12. 75% Savings
Web Servers
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29
Days of the Month
during a month
13. End of the month processing
Expand the cluster at the end of the month
Expand/Shrink feature in Amazon Elastic MapReduce
Vertically Scale up at the end of the month
Modify-DB-Instance (in Amazon RDS) (or a New RDS DB Instance )
CloudFormation Script (in Amazon EC2)
15. 3-Year RI Percentage Savings Over
On-Demand Comparison
Annual Utilization Light Medium Heavy
Utilization RI Utilization RI Utilization RI
20% 8% -14% -113%
40%
24% 26% -6%
60% 30% 39% 29%
80% 32% 45% 47%
100% 34% 49% 58%
16. Amazon EC2 Reserved Instances
for a 3-year term
Usage Fee One-time Fee Total Savings
Option 1 $4479.84 - $4479.84 -
100% On-Demand
Only
Option 2 $3030.48 $700.00 $3730.48 ~17%
50% On-Demand +
50% Reserved
(Medium
Utilization)
Option 3 $1581.12 $1400.00 $2981.12 ~34%
100% Reserved
(Medium
Utilization)
Total Cost for running four m1.small Linux instances at medium utilization
(about 366 hours per month) in the US East Region
17. 450
On Demand 1-year RI 3-year RI
400
350
300
250
200
2
150
100
50 1
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
on-demand vs. medium utilization RI
18. Recommendations
Steady State Usage : Use All Reserved
Light Utilization RI: If you plan to use your instance more
than 32% of a 1-year term or 17% of a 3-year term.
Medium Utilization RI: If you plan to use your instance
more than 49% of a 1-year term or 24% of a 3-year
term.
Heavy Utilization RI: If you plan to use your instance
more than 43% of a 1-year term or 79% of a 3-year
term.
20. Recommendations
Unpredictable Demand : Use combination of
Reserved + On-demand
With Reserved Instances, the costs average to an effective
hourly rate up to 58% lower than the On-Demand.
25. Basic recommendations on Instance Type
Choose the EC2 instance type that best matches the
resources required by the application
Start with memory requirements and architecture type
(32bit or 64-bit)
Then choose the closest number of virtual cores required
Scaling across AZs
Smaller sizes give more granularity for deploying to
multiple AZs
26. Tip – Instance Optimizer
Free Memory
Free CPU PUT 2 weeks
Free HDD
At 1-min
intervals Alarm
Amazon CloudWatch
Instance
Custom Metrics
27. Spot Instances
Bid on unused Amazon EC2 capacity.
Run instances as long as bid exceeds the current Spot Price
28.
29. What are Spot Instances?
Sold at Sold at
50%
Unused 54%
Unused
Discount! Discount!
Sold at Sold at
56%
Unused 59%
Unused
Discount! Discount!
Sold at Sold at
66%
Unused 63%
Unused
Discount! Discount!
Availability Zone Availability Zone
Region
30. What is the tradeoff?
Unused Unused
Unused
Reclaimed Unused
Unused
Reclaimed Unused
Availability Zone Availability Zone
Region
37. Strategy: Optimize for Cost
• Engineered application towards a
cost
• Set low maximum bid price to
minimize costs
• Were comfortable if process ran
longer or jobs were re-run
• Did not pay for hour if they are
interrupted
38. Strategy: Discount over On-Demand
• Bid around the On-Demand price
• Use On-Demand instance when Spot
Price exceeds On-Demand price (or
slightly higher)
• May pay more some hours, but on
average they pay significantly less
• This bidding strategy ensures a
discount over On-Demand
43. Case study: Video Transcoding Workloads
(on-demand + spot + reserved instances)
Free Offering Premium Offering
Optimize for reducing Optimized for Faster
cost response times
Acceptable Delay Limits No Delays
Implementation Implementation
Persistent Spot Requests Invest in RIs
Use on-demand Use on-demand for
Instances, if delay Elasticity
53. $0.028
per hour
(small instance)
DNS Elastic Load
Web Servers
Balancer
Availability Zone
$0.095
per hour
(small instance)
EC2 instance
DNS + software LB Web Servers
Availability Zone
54. Consumers
Producer SQS queue
$0.01 per
10,000 Requests
($0.000001 per Request)
$0.095
per hour
(small instance) Producer
EC2 instance Consumers
+ software queue
Enterprise apps also need elasticity, but in a different way
Perhaps you expect a lot of traffic as part of a planned announcement and you want to increase the size of your EC2 fleet just ahead of your press release. Maybe your site is busy once a day because you have a daily deal or a daily special, or only on weekends when people are at sporting events. Or maybe you run a college registration site and you want to scale up during day and evening hours for the four-day registration period.
Perhaps you expect a lot of traffic as part of a planned announcement and you want to increase the size of your EC2 fleet just ahead of your press release. Maybe your site is busy once a day because you have a daily deal or a daily special, or only on weekends when people are at sporting events. Or maybe you run a college registration site and you want to scale up during day and evening hours for the four-day registration period.
1 or 3 years is our commitment to the customer not theirs to us. Therefore, if a customer plans on running for at least 8 months the only sensible purchase is the 3 year.
1 or 3 years is our commitment to the customer not theirs to us. Therefore, if a customer plans on running for at least 8 months the only sensible purchase is the 3 year.
For example, if the application always scales 2 larges in each AZ, there is pretty much no difference between this approach and 1 extra large in each AZ. However it would be safer for the customer to scale 1 large in 2 AZs rather than 1 extra large in 1 AZ (and cheaper than 2 extra larges).
Use notification to optimuze
Engineered application towards a costSet low maximum bid price to minimize costsWere comfortable if process ran longer or jobs were re-runDid not pay for hour if they are interrupted
Bid around the On-Demand priceUse On-Demand instance when Spot Price exceeds On-Demand price (or slightly higher)May pay more some hours, but on average they pay significantly lessThis bidding strategy ensures a discount over On-Demand
Bid around the On-Demand priceUse On-Demand instance when Spot Price exceeds On-Demand price (or slightly higher)May pay more some hours, but on average they pay significantly lessThis bidding strategy ensures a discount over On-DemandHIDE
You canwait for resources
Show graph – and add in the picsPrice Set 10% above Average Price Last HourMaximum price threshold of 80% of On-Demand PriceOne time spot requests; one instance per request; across all availability zonesNot more than 10 open Spot requests at any timeSpot requests expire in 10 minute
Bid around the On-Demand priceUse On-Demand instance when Spot Price exceeds On-Demand price (or slightly higher)May pay more some hours, but on average they pay significantly lessThis bidding strategy ensures a discount over On-Demand
Bid around the On-Demand priceUse On-Demand instance when Spot Price exceeds On-Demand price (or slightly higher)May pay more some hours, but on average they pay significantly lessThis bidding strategy ensures a discount over On-Demand
Vimeo is about to come out with a case study. We are pushing for by the Summit, but if not you can remove the name and just use it as an example. 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.
AWS lets you lower the cost of innovationAccelerate your speed, be more agile, increase the value of your product.
* 2 HDs** 5 HDsNote that you have to pay for sending the device!FedEx: ~30€ from London to Dublin, 3kg, one day.
At 10Mbps upload speedConsidering that it takes one day to ship a device from London to Dublin
AWS lets you lower the cost of innovationAccelerate your speed, be more agile, increase the value of your product.
Use only for staticcontentS3 –Up to 10 TB / month $0.120 per GBNext 40 TB / month $0.090 per GBNext 100 TB / month $0.070 per GBNext 350 TB / month $0.050 per GBCF –United States Europe Hong Kong & Singapore Japan South AmericaFirst 10 TB / month $0.120 / GB$0.120 / GB$0.190 / GB$0.201 / GB$0.250 / GB contact usNext 40 TB / month $0.080 / GB$0.080 / GB$0.140 / GB$0.148 / GB$0.200 / GB contact usNext 100 TB / month $0.060 / GB$0.060 / GB$0.120 / GB$0.127 / GB$0.180 / GB contact usNext 350 TB / month $0.040 / GB$0.040 / GB$0.100 / GB$0.106 / GB$0.160 / GB contact usNext 524 TB / month $0.030 / GB$0.030 / GB$0.080 / GB$0.085 / GB$0.140 / GB contact usNext 4 PB / month $0.025 / GB$0.025 / GB$0.070 / GB$0.075 / GB$0.130 / GB contact us