Your SlideShare is downloading. ×
0
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Predicting Costs on AWS
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Predicting Costs on AWS

9,012

Published on

Published in: Technology, Design
0 Comments
18 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
9,012
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
68
Comments
0
Likes
18
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Predicting Costs with Amazon Web Services<br />Jeff Barr<br />Senior Web Services Evangelist<br />@jeffbarr or jbarr@amazon.com<br />
  • 2. Today’s Agenda<br />Introduction<br />The Five M’s<br />Tool Review<br />Costing Examples<br />Q&A<br />Introduction<br />The Four M’s<br />Tool Review<br />Costing Examples<br />
  • 3. New Challenges<br />Pay As You Go Cloud Services<br />Cost/Reliability Tradeoffs<br />Viral Applications<br />Automatic Scaling<br />Complex Architectures<br />Expensive Features<br />Rapid Development<br />Continuous Deployment<br />
  • 4. Detailed Cost Visibility<br />Dramatic Cost Savings<br />Aggressive, Cost-Based Pricing<br />Premium Charge for Expensive Features<br />New Business Models<br />Profitability at Any Scale<br />New Opportunities For You<br />
  • 5. Do You Know<br />Cost of one search?<br />Cost of one page view?<br />Cost to store one item?<br />Cost to support one search engine?<br />Cost to support one user?<br />Cost to do one search?<br />Does Your Competition?<br />
  • 6. Don’t Despair<br />
  • 7. AWS Cost Drivers<br />CPU Clock Hours<br />Persistent Storage<br />I/O Requests<br />Reserved Instances<br />Data Transfer (Out)<br />API Requests<br />
  • 8. The Five M’s<br />Measure<br />Model<br />Multiply<br />Monitor<br />Master<br />
  • 9. M - Model<br />Login, Search, Page View, Search Engine Hit<br />Identify functions & frequencies<br />Web Server, Database, Messaging<br />Examine architecture<br />CPU, Database, Bandwidth<br />Identify cost components<br />(𝑅𝑒𝑠𝑜𝑢𝑟𝑐𝑒𝑖 × 𝐶𝑜𝑠𝑡𝑖) <br /> <br />Construct cost model<br />
  • 10. M - Measure<br />Login, Search, Page View, Search Engine Hit<br />Isolate a functional app component<br />Test Harness<br />Run in controlled environment<br />CloudWatch, AWS Account, Logs, etc.<br />Track resource usage<br />Use published AWS Prices<br />Map resource consumption to costs<br />
  • 11. Measurement Results (Sample)<br />
  • 12. M - Multiply<br />Compute frequencies x Measurements<br />Map resource consumption to costs<br />Easy for storage and bandwidth<br />Challenging (but achievable) for CPU<br />
  • 13. M - Monitor<br />Establish cost baseline<br />Watch for deviations<br />Consider implications of changes to code<br />Storing additional data for each user<br />For Example<br />Performing an extra query for each RSS Feed<br />
  • 14. M - Master<br />There’s plenty to learn<br />Start small and grow over time<br />Check calculated results against actual<br />Accumulate experience & knowledge<br />
  • 15. Costing and Monitoring Tools<br />AWS Calculator<br />AWS Account Activity Page<br />AWS Usage Reports<br />Amazon CloudWatch<br />Service Logs<br />S3, CloudFront<br />
  • 16. Costing Examples<br />Static microsite stored in Amazon S3<br />Simple dynamic site (EC2 + RDS)<br />Load-balanced, auto-scaled dynamic site<br />Your mileage will vary<br />
  • 17. Static Microsite – Overview<br />Stored in Amazon S3<br />Distributed via CloudFront<br />Components:<br />1 x HTML Page = 50 Kb<br /> 1 x CSS Style Sheet = 10 Kb<br />1 x JavaScript = 40 Kb<br />50 x JPG @ 20 Kb = 1 Mb<br />Total: 1.1 Mb for 53 objects<br />
  • 18. Microsite Architecture<br />CloudFront Edge Location<br />CloudFront Edge Location<br />CloudFront Edge Location<br />CloudFront Edge Location<br />…<br />…<br />…<br />CloudFront Distribution<br />{<br />S3 Bucket<br />HTML<br />Image<br />…<br />CSS<br />JavaScript<br />Image<br />
  • 19. Static Microsite – S3<br />Monthly S3 storage cost:<br />Store 1/1000 of 1 GB<br />Update 2x / month (PUT)<br />Transfer 53 objects to 19 CloudFront nodes 10x / month (GET)<br />
  • 20. Static Microsite – CloudFront<br />Monthly CloudFront data transfer cost at 1 million page views / day:<br />Data transfer (1.1 / 1024) * 30 * 1,000,000<br />
  • 21. Static Microsite - Costs<br />
  • 22. Simple Dynamic Site - Overview<br />EC2 Instance – Application and Web Tiers<br /> 100K hits per day, 50 Kb average response<br />RDS DB Instance - Primary storage<br /> 50 Gb Database, 10% churn, daily backup<br />50 Gb<br />EC2<br />RDS<br />5 Gb<br />5 Gb<br />5 Gb<br />5 Gb<br />5 Gb<br />5 Gb<br />5 Gb<br />5 Gb<br />
  • 23. Simple Dynamic Site – EC2<br />Monthly EC2 costs:<br />M1.small instance, ephemeral storage<br />100K x 50 Kb x 30 Days = 150 Gb / month<br />
  • 24. Simple Dynamic Site – RDS<br />Monthly RDS costs:<br />Small RDS instance, 5 IOP per hit on site<br />100K x 5 x 30 = 15M IOP / month<br />
  • 25. Simple Dynamic Site - Costs<br />
  • 26. Complex Dynamic Site - Overview<br />Auto Scaled EC2 Instances<br /> Application and Web Tiers<br /> 10K-1M hits per day, 50 Kb average responseAssume 1 small instance for each 10K hits/hour<br />RDS DB Instance - Primary storage<br /> 100 Gb Database, 10% churn, daily backup<br />
  • 27. Auto Scaling Group<br />Complex Dynamic Site - Architecture<br />Elastic Load Balancer<br />EC2<br />EC2<br />Scale from 1 to 10 instances based on load…<br />…<br />RDS Primary<br />10 Gb<br />RDS Secondary<br />10 Gb<br />10 Gb<br />10 Gb<br />10 Gb<br />100 Gb<br />10 Gb<br />10 Gb<br />10 Gb<br />100 Gb<br />
  • 28. Complex Dynamic Site – Daily Usage Profile<br />
  • 29. Complex Dynamic Site – The Numbers<br />100 instance hours per day<br />1 million hits per day<br />50 GB of outbound data transfer per day<br />5 GB of inbound data transfer per day<br />5 million RDS IOPS per day<br />
  • 30. Complex Dynamic Site – EC2 + ELB<br />Monthly EC2 costs:<br />4 M1.small instance, ephemeral storage<br />50 GB of data transfer out, 5 GB in<br />
  • 31. Complex Dynamic Site – RDS<br />Monthly RDS costs:<br />Small RDS instance, Multi-AZ,<br />5 IOP per hit on site<br />5 million IOP per day<br />
  • 32. Complex Dynamic Site - Costs<br />
  • 33. Your Turn<br /> Discussion!<br />
  • 34. Going Further<br />AWS Calculator<br />AWS Architecture Center<br />AWS Economics Center<br />Third Party Tools and Applications:<br />RightScale<br />Cloudability <br />
  • 35. Thanks for Attending!<br />

×