Journey through the Cloud:        Cost optimization    Ryan Shuttleworth – Technical Evangelist                 @ryanAWS
Journey through the cloudCommon use cases & stepping stones into the AWS cloud                     Learning from customer ...
Cost Optimization               A key step in the cloud journey             Realize cost aware architecturesUse elasticity...
AgendaFundamentals of AWS cost optimizationCost optimization in 5 stepsWhere to go next
Fundamentals of cost optimization
Why optimize?
Why optimize?       UtilityCompute and Storageare a utility so ‘turningoff’ should be natural
Why optimize?       Utility                 EfficiencyCompute and Storage           Efficiency allowsare a utility so ‘tur...
Why optimize?       Utility                 Efficiency             ArchitectureCompute and Storage           Efficiency al...
Turn off the lightsWhen you stop EC2 resources you stop          paying for them
Be elastic Support workloads with the rightamount of horsepower to get the job              done
Continually optimizeDrive recurring and improving savings  through cost aware architectures
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
Server Load         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                               Hour of...
Server Load                                                        Capacity of 1 Server         0 1 2 3 4 5 6 7 8 9 10 11 ...
Traditional capacity requiredServer Load                                                          Capacity of 1 Server    ...
Traditional capacity requiredServer Load                                                          Capacity of 1 Server    ...
Traditional capacity requiredServer Load                                                                     Capacity of 1...
Traditional capacity required                                     1 Server for 8 hoursServer Load                         ...
Traditional capacity required                                     1 Server for 8 hoursServer Load                         ...
Traditional capacity requiredServer Load                                                          Capacity of 1 Server    ...
Elastic Capacity2 am
Elastic Capacity8 am
Elastic Capacity12 am
Elastic Capacity4 pm
Elastic Capacity10 pm
Time: +00h     <10 coresElastic Capacity
Time: +24h      >1500 coresElastic Capacity
Time: +72h          <10 coresElastic Capacity
Time: +120h                   >600 coresElastic Capacity
Auto-scaling policies                 Manually                       By Schedule         Send an API call or use CLI to   ...
Auto-scaling policies   Scaling base on Policy                    Scaling by ScheduleScale up and down base on metrics    ...
6                 5Instance Count                 4                 3                 2                 1                 ...
6                 5                                               MonthlyInstance Count                 4                 ...
Traditional capacity required                 6                 5Instance Count                 4                 3       ...
Traditional capacity required                 6                 5Instance Count                 4                 3       ...
Traditional capacity required                 6                 5Instance Count                 4                         ...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
Instance types
Instance types        Start Choose instance that   meets your basic  requirements bestMatch memory & virtual        cores
Instance types        Start                    Tune Choose instance that    Change instance size up   meets your basic    ...
Instance types        Start                    Tune                   Spread Choose instance that    Change instance size ...
Know your usage                    Free Memory                      Free CPU                      Free HDD                ...
Choose your metric optimize for the metric
Choose your metric          optimize for the metric                Cost per unit of work per instance(size) Workload A    ...
Choose your metric        optimize for the metric             Cost per unit of work per instance(size)100 concurrent jobs ...
Choose your metric        optimize for the metric         Think workload densityDon’t focus on instance hourly rate per se
Master Accountaws.invoices@mycompany.com
Master Account    aws.invoices@mycompany.comconsolidated billing information            Division B         admin@divisionB...
Master Account    aws.invoices@mycompany.comconsolidated billing information            Tags: (key-                       ...
Master Account                                      aws.invoices@mycompany.com                                  consolidat...
Master Account                                      aws.invoices@mycompany.com                                  consolidat...
Programmatic billing access                                          Master Account                                      a...
Programmatic billing access                                          Master Account                                      a...
Basic        Offering             24x7x365                    ✓Developer    Forum Access                ✓             Docu...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
Reserved instances    On-demand instances   Unix/Linux instances start at           $0.02/hour   Pay as you go for compute...
Reserved instances    On-demand instances                             Reserved instances   Unix/Linux instances start at  ...
Reserved instances                                                                                 Heavy utilization RI   ...
Reserved instances                                                                                   Heavy utilization RI ...
Reserved instances                                                                                   Heavy utilization RI ...
Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000                          Heavy                          Me...
Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000                          Heavy                          Me...
Optimizing costs with RIs 14 12 10                                                                                        ...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
Spot instances    On-demand instances                             Reserved instances   Unix/Linux instances start at      ...
Spot instances    On-demand instances                             Reserved instances                                    Sp...
Achieving economies of scale 100%                               Time
Achieving economies of scale 100%                    Reserved capacity                                        Time
Achieving economies of scale 100%                          On                      On-demand                    Reserved c...
Achieving economies of scale 100%                        Spot                           On                      On-demand ...
If your bid > spot price    You get an instance
If your bid < spot price Your instance is terminated
Architecting for spot instances  Decouple components                 Design for interruption Separate interactive & backen...
EMR with spot instances          Scenario #1              Job Flow          Duration:              14 Hours      #1: Cost ...
EMR with spot instances          Scenario #1               Scenario #2              Job Flow                  Job Flow    ...
EMR with spot instances          Scenario #1                         Scenario #2              Job Flow                    ...
EMR with spot instances          Scenario #1                                  Scenario #2              Job Flow           ...
Spot marketBidding strategies
Spot bidding strategies                                       Bid Distribution (for 3 months period)                      ...
Spot bidding strategies                                                     Bid Distribution (for 3 months period)        ...
Spot bidding strategies                                            Bid Distribution (for 3 months period)                 ...
Spot bidding strategies                                       Bid Distribution (for 3 months period)                      ...
Spot bidding strategies                                       Bid Distribution (for 3 months period)                      ...
Bid near the reserved hourly price       You only pay for a full hour
Bid near the reserved hourly price          You only pay for a full hour   (if you are interrupted the hour is free)
Bid above the on-demand price     Expect fewer interruptions
Bid above the on-demand price     Expect fewer interruptions      (only pay the spot price)
Implement cost aware architectureFlip from spot to on-demand as price dictates
Spot customers
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
$0.028 per hour   DNS   Elastic Load     Web Servers                    Balancer                                 Availabil...
$0.028 per hour           DNS   Elastic Load              Web Servers                            Balancer                 ...
Consumers                          Producer   SQS queue$0.01 per10,000 Requests($0.000001 per Request)
Consumers                          Producer        SQS queue$0.01 per10,000 Requests($0.000001 per Request)               ...
Software vs services     Software on EC2                 AWS Services            Pros:           ELB, SNS, SQS, SES, SWF, ...
Summary
5 Steps for cost                 optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary s...
Where to go next
Useful linksaws.amazon.com/economicsaws.amazon.com/calculator
Useful links               http://aws.amazon.com/whitepapers
aws.amazon.com
Journey Through the AWS Cloud; Cost Optimisation
Journey Through the AWS Cloud; Cost Optimisation
Journey Through the AWS Cloud; Cost Optimisation
Journey Through the AWS Cloud; Cost Optimisation
Journey Through the AWS Cloud; Cost Optimisation
Upcoming SlideShare
Loading in...5
×

Journey Through the AWS Cloud; Cost Optimisation

1,189

Published on

Listen to the webinar recording: http://youtu.be/XLrDxRiLg70

This is the final in our series of webinars, 'Journey Through the AWS Cloud'. This webinar discusses strategies to help you save money in the AWS Cloud.

From turning systems off at night, to implementing bidding strategies on the spot market, there are many ways in which you can manage costs in AWS. This webinar will dive into the differences between instance types, explain the intricacies of Reserved Instances, the spot market and architecting to reduce costs. It discusses how to combine on-demand pricing with spot pricing to perform cost effective big data analysis, and introduce customer examples to illustrate how AWS customers gain the most from AWS whilst at the same time managing their spend.

Published in: Technology
0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,189
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
84
Comments
0
Likes
5
Embeds 0
No embeds

No notes for slide

Journey Through the AWS Cloud; Cost Optimisation

  1. 1. Journey through the Cloud: Cost optimization Ryan Shuttleworth – Technical Evangelist @ryanAWS
  2. 2. Journey through the cloudCommon use cases & stepping stones into the AWS cloud Learning from customer journeys Best practices to bootstrap your projects
  3. 3. Cost Optimization A key step in the cloud journey Realize cost aware architecturesUse elasticity to real and measurable benefit Do more, use less
  4. 4. AgendaFundamentals of AWS cost optimizationCost optimization in 5 stepsWhere to go next
  5. 5. Fundamentals of cost optimization
  6. 6. Why optimize?
  7. 7. Why optimize? UtilityCompute and Storageare a utility so ‘turningoff’ should be natural
  8. 8. Why optimize? Utility EfficiencyCompute and Storage Efficiency allowsare a utility so ‘turning more to be doneoff’ should be natural within a given budget
  9. 9. Why optimize? Utility Efficiency ArchitectureCompute and Storage Efficiency allows Cost awareness drivesare a utility so ‘turning more to be done adoption of 21st centuryoff’ should be natural within a given budget architectures
  10. 10. Turn off the lightsWhen you stop EC2 resources you stop paying for them
  11. 11. Be elastic Support workloads with the rightamount of horsepower to get the job done
  12. 12. Continually optimizeDrive recurring and improving savings through cost aware architectures
  13. 13. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  14. 14. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  15. 15. Server Load 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 Hour of day
  16. 16. Server Load Capacity of 1 Server 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 Hour of day
  17. 17. Traditional capacity requiredServer Load Capacity of 1 Server 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 Hour of day
  18. 18. Traditional capacity requiredServer Load Capacity of 1 Server 1 Server for 8 hours 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 Hour of day
  19. 19. Traditional capacity requiredServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 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 Hour of day
  20. 20. Traditional capacity required 1 Server for 8 hoursServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 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 Hour of day
  21. 21. Traditional capacity required 1 Server for 8 hoursServer Load Capacity of 1 Server 1 Server for 8 hours 1 Server for 8 hours 1 Server for 8 hours 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 Hour of day
  22. 22. Traditional capacity requiredServer Load Capacity of 1 Server 1/3rd Saving 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 Hour of day
  23. 23. Elastic Capacity2 am
  24. 24. Elastic Capacity8 am
  25. 25. Elastic Capacity12 am
  26. 26. Elastic Capacity4 pm
  27. 27. Elastic Capacity10 pm
  28. 28. Time: +00h <10 coresElastic Capacity
  29. 29. Time: +24h >1500 coresElastic Capacity
  30. 30. Time: +72h <10 coresElastic Capacity
  31. 31. Time: +120h >600 coresElastic Capacity
  32. 32. Auto-scaling policies Manually By Schedule Send an API call or use CLI to Scale up/down based on date launch/terminate instances – and time Only need to specify capacity change (+/-) By Policy Auto-Rebalance Scale in response to changing Instances are automatically conditions, based on user launched/terminated to configured real-time ensure the application is monitoring and alerts balanced across multiple Azs
  33. 33. Auto-scaling policies Scaling base on Policy Scaling by ScheduleScale up and down base on metrics Scheduled Actions to meet known demandScaling Up policy - Double the group size if avg cpu > 80% Scheduled up to 31 days into the futureScaling Down policy - Decrement by Recurring scheduled scaling activities 10% if avg cpu < 30%
  34. 34. 6 5Instance Count 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  35. 35. 6 5 MonthlyInstance Count 4 predictable 3 peak processing 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  36. 36. Traditional capacity required 6 5Instance Count 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  37. 37. Traditional capacity required 6 5Instance Count 4 3 2 1 Elastic Capacity 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  38. 38. Traditional capacity required 6 5Instance Count 4 75 % Savings 3 2 1 Elastic Capacity 0 0 1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930 Day of Month
  39. 39. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  40. 40. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  41. 41. Instance types
  42. 42. Instance types Start Choose instance that meets your basic requirements bestMatch memory & virtual cores
  43. 43. Instance types Start Tune Choose instance that Change instance size up meets your basic or down based upon requirements best monitoringMatch memory & virtual Use trusted advisor to cores assess
  44. 44. Instance types Start Tune Spread Choose instance that Change instance size up Run instances across meets your basic or down based upon multiple availability requirements best monitoring zonesMatch memory & virtual Use trusted advisor to Smaller sizes equals cores assess greater granularity
  45. 45. Know your usage Free Memory Free CPU Free HDD PUT 2 weeks … Custom Metrics … Amazon Instance At 1-min intervals Alarm CloudWatch
  46. 46. Choose your metric optimize for the metric
  47. 47. Choose your metric optimize for the metric Cost per unit of work per instance(size) Workload A Workload B Workload COptimal on 4x Optimal on 10x Optimal on 2x m1.xlarge m1.medium m3.xxlarge
  48. 48. Choose your metric optimize for the metric Cost per unit of work per instance(size)100 concurrent jobs on 10 x m1.large @ $0.26 / hr = $ 0.026 / job vs300 concurrent jobs on 10 x m3.xlarge @ $0.58 / hr = $ 0.019 / job
  49. 49. Choose your metric optimize for the metric Think workload densityDon’t focus on instance hourly rate per se
  50. 50. Master Accountaws.invoices@mycompany.com
  51. 51. Master Account aws.invoices@mycompany.comconsolidated billing information Division B admin@divisionB.com IAM User2 Dev2 Admin2
  52. 52. Master Account aws.invoices@mycompany.comconsolidated billing information Tags: (key- value) Division B e.g Own=Div Proj=R admin@divisionB.com IAM User2 Dev2 Admin2 Tags: Tags: Tags: Own=Div Own=Div Own=Div Proj=P Proj=Q Proj=R
  53. 53. Master Account aws.invoices@mycompany.com consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  54. 54. Master Account aws.invoices@mycompany.com consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  55. 55. Programmatic billing access Master Account aws.invoices@mycompany.com S3 CSV consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  56. 56. Programmatic billing access Master Account aws.invoices@mycompany.com S3 CSV consolidated billing information Operating Co. A Division B Business Unit C admin@opcoa.com admin@divisionB.com admin@busUnitC.com User1 User2 User3 IAM IAM IAM Dev1 Dev2 Dev3 Admin1 Admin2 Admin3Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags: Tags:Own=OpCo Own=OpCo Own=OpCo Own=Div Own=Div Own=Div Own=BusC Own=BusC Own=BusCProj=A Proj=B Proj=C Proj=P Proj=Q Proj=R Proj=X Proj=Y Proj=Z
  57. 57. Basic Offering 24x7x365 ✓Developer Forum Access ✓ Documentation ✓Business Access to support Phone, Chat, EmailEnterprise Named Contacts 5 Fastest Response Time 1 Hour Architecture Support Use Case Guidance Best Practice ✓ Diagnostics Tools ✓ Direct Routing ✓ 3rd Party Software ✓ Trusted Advisor ✓
  58. 58. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  59. 59. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  60. 60. Reserved instances On-demand instances Unix/Linux instances start at $0.02/hour Pay as you go for compute power Low cost and flexibility Pay only for what you use, no up-front commitments or long-term contracts Use Cases: Applications with short term, spiky, or unpredictable workloads; Application development or testing
  61. 61. Reserved instances On-demand instances Reserved instances Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  62. 62. Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  63. 63. Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Medium utilization RI Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability 41-79% utilization Lower costs up to 49% Pay only for what you use, no up-front Helps ensure compute capacity is available Use Cases: Web applications, many heavy commitments or long-term contracts when needed processing tasks, running much of the time Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  64. 64. Reserved instances Heavy utilization RI > 80% utilization Lower costs up to 58% On-demand instances Reserved instances Use Cases: Databases, Large Scale HPC, Always-on infrastructure, Baseline Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Medium utilization RI Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability 41-79% utilization Lower costs up to 49% Pay only for what you use, no up-front Helps ensure compute capacity is available Use Cases: Web applications, many heavy commitments or long-term contracts when needed processing tasks, running much of the time Use Cases: Use Cases: Applications with short term, spiky, or Light utilization RI unpredictable workloads; Applications with steady state or predictable usage Application development or testing 15-40% utilization Applications that require reserved capacity, Lower costs up to 34% including disaster recovery Use Cases: Disaster Recovery, Weekly / Monthly reporting, Elastic Map Reduce
  65. 65. Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000 Heavy Medium $8,000 Light $6,000 O-Demand $4,000 $2,000 $-
  66. 66. Best RI for Utilisation $18,000 $16,000 $14,000 $12,000 $10,000 Heavy Medium $8,000 Light $6,000 O-Demand $4,000 $2,000 $-
  67. 67. Optimizing costs with RIs 14 12 10 On Demand 8 Light Utilization RI 6 Medium Utilization RI Heavy utilization RI 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
  68. 68. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  69. 69. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  70. 70. Spot instances On-demand instances Reserved instances Unix/Linux instances start at 1- or 3-year terms $0.02/hour Pay low up-front fee, receive significant hourly Pay as you go for compute power discount Low cost and flexibility Low Cost / Predictability Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable usage Application development or testing Applications that require reserved capacity, including disaster recovery
  71. 71. Spot instances On-demand instances Reserved instances Spot instances Unix/Linux instances start at 1- or 3-year terms Bid on unused EC2 capacity $0.02/hour Pay low up-front fee, receive significant hourly Spot Price based on supply/demand, Pay as you go for compute power discount determined automatically Low cost and flexibility Low Cost / Predictability Cost / Large Scale, dynamic workload handling Pay only for what you use, no up-front Helps ensure compute capacity is available commitments or long-term contracts when needed Use Cases: Use Cases: Use Cases: Applications with flexible start and end times Applications with short term, spiky, or unpredictable workloads; Applications with steady state or predictable Applications only feasible at very low compute usage prices Application development or testing Applications that require reserved capacity, including disaster recovery
  72. 72. Achieving economies of scale 100% Time
  73. 73. Achieving economies of scale 100% Reserved capacity Time
  74. 74. Achieving economies of scale 100% On On-demand Reserved capacity Time
  75. 75. Achieving economies of scale 100% Spot On On-demand Reserved capacity Time
  76. 76. If your bid > spot price You get an instance
  77. 77. If your bid < spot price Your instance is terminated
  78. 78. Architecting for spot instances Decouple components Design for interruption Separate interactive & backend Use SQS, SWF processing Place data in a durable store such as S3, Use frameworks such as Elastic SimpleDB or DynamoDB MapReduce Save progress regularly
  79. 79. EMR with spot instances Scenario #1 Job Flow Duration: 14 Hours #1: Cost without Spot4 instances *14 hrs * $0.50 = $28
  80. 80. EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Duration: Duration: 14 Hours 7 Hours #1: Cost without Spot4 instances *14 hrs * $0.50 = $28
  81. 81. EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Duration: Duration: 14 Hours 7 Hours #1: Cost without Spot #2: Cost with Spot4 instances *14 hrs * $0.50 = $28 4 instances *7 hrs * $0.50 = $14 + 5 instances * 7 hrs * $0.25 = $8.75 Total = $22.75
  82. 82. EMR with spot instances Scenario #1 Scenario #2 Job Flow Job Flow Time Savings: 50% Duration: Cost Savings: ~22% Duration: 14 Hours 7 Hours #1: Cost without Spot #2: Cost with Spot4 instances *14 hrs * $0.50 = $28 4 instances *7 hrs * $0.50 = $14 + 5 instances * 7 hrs * $0.25 = $8.75 Total = $22.75
  83. 83. Spot marketBidding strategies
  84. 84. Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% 10% 8% 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  85. 85. Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid near the RI 10% 8% hourly price 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  86. 86. Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid above the spot price 10% 8% history 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  87. 87. Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% Bid near the 10% on-demand 8% price 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  88. 88. Spot bidding strategies Bid Distribution (for 3 months period) 20%Percentage of the Distribution 18% 16% 14% 12% 10% Bid above the on-demand price 8% 6% 4% 2% 0% Bid Price as Percentage of the On-Demand Price
  89. 89. Bid near the reserved hourly price You only pay for a full hour
  90. 90. Bid near the reserved hourly price You only pay for a full hour (if you are interrupted the hour is free)
  91. 91. Bid above the on-demand price Expect fewer interruptions
  92. 92. Bid above the on-demand price Expect fewer interruptions (only pay the spot price)
  93. 93. Implement cost aware architectureFlip from spot to on-demand as price dictates
  94. 94. Spot customers
  95. 95. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  96. 96. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  97. 97. $0.028 per hour DNS Elastic Load Web Servers Balancer Availability Zone
  98. 98. $0.028 per hour DNS Elastic Load Web Servers Balancer Availability Zone VS$0.085 per hour EC2 instance(small instance) DNS Web Servers + software LB Availability Zone
  99. 99. Consumers Producer SQS queue$0.01 per10,000 Requests($0.000001 per Request)
  100. 100. Consumers Producer SQS queue$0.01 per10,000 Requests($0.000001 per Request) VS$0.085 per hour Producer (small instance) EC2 instance Consumers + software queue
  101. 101. Software vs services Software on EC2 AWS Services Pros: ELB, SNS, SQS, SES, SWF, DynamoDB etc Use custom features Pros: Pay as you go Cons: Scalability Requires an instance Availability SPOF High performance Limited to one AZ DIY administration
  102. 102. Summary
  103. 103. 5 Steps for cost optimizationElastic capacityInstance typesReserved instancesSpot instancesComplementary services
  104. 104. Where to go next
  105. 105. Useful linksaws.amazon.com/economicsaws.amazon.com/calculator
  106. 106. Useful links http://aws.amazon.com/whitepapers
  107. 107. aws.amazon.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×