• Save
Predicting Costs on AWS
Upcoming SlideShare
Loading in...5
×
 

Predicting Costs on AWS

on

  • 8,300 views

 

Statistics

Views

Total Views
8,300
Views on SlideShare
7,807
Embed Views
493

Actions

Likes
12
Downloads
68
Comments
0

8 Embeds 493

http://www.newvem.com 427
http://newvem.staging.wpengine.com 41
http://paper.li 17
http://newvem.zendesk.com 3
http://knowledge.newvem.com 2
http://a0.twimg.com 1
http://us-w1.rockmelt.com 1
http://localhost 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Predicting Costs on AWS Predicting Costs on AWS Presentation Transcript

  • Predicting Costs with Amazon Web Services
    Jeff Barr
    Senior Web Services Evangelist
    @jeffbarr or jbarr@amazon.com
  • Today’s Agenda
    Introduction
    The Five M’s
    Tool Review
    Costing Examples
    Q&A
    Introduction
    The Four M’s
    Tool Review
    Costing Examples
  • New Challenges
    Pay As You Go Cloud Services
    Cost/Reliability Tradeoffs
    Viral Applications
    Automatic Scaling
    Complex Architectures
    Expensive Features
    Rapid Development
    Continuous Deployment
  • Detailed Cost Visibility
    Dramatic Cost Savings
    Aggressive, Cost-Based Pricing
    Premium Charge for Expensive Features
    New Business Models
    Profitability at Any Scale
    New Opportunities For You
  • Do You Know
    Cost of one search?
    Cost of one page view?
    Cost to store one item?
    Cost to support one search engine?
    Cost to support one user?
    Cost to do one search?
    Does Your Competition?
  • Don’t Despair
  • AWS Cost Drivers
    CPU Clock Hours
    Persistent Storage
    I/O Requests
    Reserved Instances
    Data Transfer (Out)
    API Requests
  • The Five M’s
    Measure
    Model
    Multiply
    Monitor
    Master
  • M - Model
    Login, Search, Page View, Search Engine Hit
    Identify functions & frequencies
    Web Server, Database, Messaging
    Examine architecture
    CPU, Database, Bandwidth
    Identify cost components
    (𝑅𝑒𝑠𝑜𝑢𝑟𝑐𝑒𝑖 × 𝐶𝑜𝑠𝑡𝑖) 
     
    Construct cost model
  • M - Measure
    Login, Search, Page View, Search Engine Hit
    Isolate a functional app component
    Test Harness
    Run in controlled environment
    CloudWatch, AWS Account, Logs, etc.
    Track resource usage
    Use published AWS Prices
    Map resource consumption to costs
  • Measurement Results (Sample)
  • M - Multiply
    Compute frequencies x Measurements
    Map resource consumption to costs
    Easy for storage and bandwidth
    Challenging (but achievable) for CPU
  • M - Monitor
    Establish cost baseline
    Watch for deviations
    Consider implications of changes to code
    Storing additional data for each user
    For Example
    Performing an extra query for each RSS Feed
  • M - Master
    There’s plenty to learn
    Start small and grow over time
    Check calculated results against actual
    Accumulate experience & knowledge
  • Costing and Monitoring Tools
    AWS Calculator
    AWS Account Activity Page
    AWS Usage Reports
    Amazon CloudWatch
    Service Logs
    S3, CloudFront
  • Costing Examples
    Static microsite stored in Amazon S3
    Simple dynamic site (EC2 + RDS)
    Load-balanced, auto-scaled dynamic site
    Your mileage will vary
  • Static Microsite – Overview
    Stored in Amazon S3
    Distributed via CloudFront
    Components:
    1 x HTML Page = 50 Kb
    1 x CSS Style Sheet = 10 Kb
    1 x JavaScript = 40 Kb
    50 x JPG @ 20 Kb = 1 Mb
    Total: 1.1 Mb for 53 objects
  • Microsite Architecture
    CloudFront Edge Location
    CloudFront Edge Location
    CloudFront Edge Location
    CloudFront Edge Location



    CloudFront Distribution
    {
    S3 Bucket
    HTML
    Image

    CSS
    JavaScript
    Image
  • Static Microsite – S3
    Monthly S3 storage cost:
    Store 1/1000 of 1 GB
    Update 2x / month (PUT)
    Transfer 53 objects to 19 CloudFront nodes 10x / month (GET)
  • Static Microsite – CloudFront
    Monthly CloudFront data transfer cost at 1 million page views / day:
    Data transfer (1.1 / 1024) * 30 * 1,000,000
  • Static Microsite - Costs
  • Simple Dynamic Site - Overview
    EC2 Instance – Application and Web Tiers
    100K hits per day, 50 Kb average response
    RDS DB Instance - Primary storage
    50 Gb Database, 10% churn, daily backup
    50 Gb
    EC2
    RDS
    5 Gb
    5 Gb
    5 Gb
    5 Gb
    5 Gb
    5 Gb
    5 Gb
    5 Gb
  • Simple Dynamic Site – EC2
    Monthly EC2 costs:
    M1.small instance, ephemeral storage
    100K x 50 Kb x 30 Days = 150 Gb / month
  • Simple Dynamic Site – RDS
    Monthly RDS costs:
    Small RDS instance, 5 IOP per hit on site
    100K x 5 x 30 = 15M IOP / month
  • Simple Dynamic Site - Costs
  • Complex Dynamic Site - Overview
    Auto Scaled EC2 Instances
    Application and Web Tiers
    10K-1M hits per day, 50 Kb average responseAssume 1 small instance for each 10K hits/hour
    RDS DB Instance - Primary storage
    100 Gb Database, 10% churn, daily backup
  • Auto Scaling Group
    Complex Dynamic Site - Architecture
    Elastic Load Balancer
    EC2
    EC2
    Scale from 1 to 10 instances based on load…

    RDS Primary
    10 Gb
    RDS Secondary
    10 Gb
    10 Gb
    10 Gb
    10 Gb
    100 Gb
    10 Gb
    10 Gb
    10 Gb
    100 Gb
  • Complex Dynamic Site – Daily Usage Profile
  • Complex Dynamic Site – The Numbers
    100 instance hours per day
    1 million hits per day
    50 GB of outbound data transfer per day
    5 GB of inbound data transfer per day
    5 million RDS IOPS per day
  • Complex Dynamic Site – EC2 + ELB
    Monthly EC2 costs:
    4 M1.small instance, ephemeral storage
    50 GB of data transfer out, 5 GB in
  • Complex Dynamic Site – RDS
    Monthly RDS costs:
    Small RDS instance, Multi-AZ,
    5 IOP per hit on site
    5 million IOP per day
  • Complex Dynamic Site - Costs
  • Your Turn
    Discussion!
  • Going Further
    AWS Calculator
    AWS Architecture Center
    AWS Economics Center
    Third Party Tools and Applications:
    RightScale
    Cloudability
  • Thanks for Attending!