High PerformanceWeb ApplicationsDr. Matt Woodmatthew@amazon.com@mza
Hello
Building blocks for wonderful applicationsStorage, compute, databases, managed services
Retail   Merchant     Web         services   services
Retail   Merchant     Web         services   services
H Getting started withAmazon Web Services                   quick review
H    Utility computing    Available at the end of an API call.    Metered billing.
H    Family of 20 services    Adding new services and refinement weekly.    Rapid rate of innovation.
H    Undi!erentiated heavy lifting    Focus on your app, customers and business
H
H    aws.amazon.com    Free account.    Free tier.
rBuilding High Performance     Web Applications
r    Deliver a great experience to    your customers.    Responsive, fast web applications.
SCALE    g        DECOUPLED            OUT             OPTIMIZE   FOR   COST S       5                 patterns for       ...
g   DECOUPLED
Monolithic Mega System v2
AssetsApplication  Analytics
AssetsApplication  Analytics
r    Images, javascript, stylesheets,    HTML pages    Deliver as fast as possible to customers
r    Websites without the servers    Highly durable: 99.999999999%    Zero config: fire and forget
r    Low latency delivery of assets    Local caching for fast downloads    Amazon CloudFront
PP
r    Create content distributions    From objects in S3    Any custom origin    Dynamic, streaming and static content
P    PP
r    CNAME?    Map to any custom URL    assets.domain.com, www.domain.com
AssetsApplication  Analytics
AssetsApplication  Analytics
r    Application architecture    Small things, loosely coupled
AssetsApplication  Analytics
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Shared responsibility    Infrastructure by AWS    OS, application and data by customers    Tools to help meet best pr...
r    Security groups    Customer controlled firewalls    All ports are closed by default
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets                  Load balancer              x   App serversApplication                  Database                  A...
r    Decoupling provides an architectural    framework for performance    Easier to separate concerns: assets, streaming, ...
SCALE OUT
r    Elasticity is a tenet of the cloud    Scale up when you need to    Scale down when you don’t
r Predictable peaksDemand                         Capacity                      Time
r Predictable peaksDemand                         Capacity                      Time
r Variable usageDemand                      Capacity                   Time
r Variable usageDemand                      Capacity                   Time
r Variable usageDemand                   Time
r    Horizontal scaling    drives performance up    ...and costs down
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Amazon Machine Images    encapsulate your app    Customize your virtual machines    AMI can be the unit of deployment
r    1. Spin up a new instance    using your AMI    Configured to bootstrap the app.
r    2. Pull down latest code base    From S3 or code repository
r    3. Start up the app on the instance    Ready to receive requests
r    4. Register with the load balancer    Job done.
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Horizontal scaling allows for    fault tolerance
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets                   Load balancer              :(   App serversApplication                   Database                ...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Deploying and scaling a datastore    Follow the same patterns:    horizontal scale, availability, automation.
r    One question:    Does your application require a    strict, controlled schema for query flexibility?
Does your application require a strict, controlled schemar   for query flexibility? Yes    Amazon Relational Database Servi...
r    Focus on your app    Handles tedious database admin tasks    Designed for availability
r    Multi-engine    MySQL, Oracle, Microsoft SQL Server    Up and running in six clicks
r    Point in time snapshots    Automatic. Easy recovery.
r    High availability    Deployed across multiple availability zones.    Synchronous writes.
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Read replicas    Perfect for read heavy applications.    Asynchronous writes.    Replication metrics available.
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
Does your application require a strict, controlled schemar   for query flexibility? No    Amazon DynamoDB    Web apps, soci...
r    Focus on your app    Managed NoSQL database service.    No schema.
r    Unlimited scale    Unlimited storage    Pay as you go
r    High performance    Single digit millisecond latencies
r    Zero admin    No instances to manage    Tiny API, perfectly formed
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    Asynchronous processing    Resize images. Transcode movies.    Resample media.
r    Follow the same best practices    Decouple. Stateless. Horizontal scale.
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
r    CloudFront for dynamic content    Edge caching for dynamic content    Cache by query string parameters    Multiple or...
CAUTOMATE
r    Automate everything    The tedious.    The time consuming.    The error prone.
r    For example:    when increasing capacity    Launch instance.    Update application code.    Register with load balanc...
r    Auto-scaling    CloudWatch    Auto-scaling service    Elastic Load Balancer
r    Set operational thresholds    Network capacity > 80%    Memory utilization > 75%    CPU < 50%
r    Automatically respond to    operational alarms    Network capacity > 80%: add instances    Memory utilization > 75%: ...
r    Set bounds    Step change configured by number or    percentage of instances
r    Custom metrics    Respond to custom metrics    Page load time    Database query time
r    Automatic load balancer    configuration    Instances added/removed automatically    Health check for running applicat...
r    Stateless operations are important    Decoupled, but stateless    Instances are naive to other instances
r    Treat your data as a royal garden    Backup to S3: high durability    Compute is a disposable resource
CALIBRATED FOR:v   CPU performance
r    Range of resources    Choose the best instance type    for performance
rt1.micro   m1.small   cc2.8xlarge
r                      High memory              High CPU + memoryt1.micro   m1.small                 High CPU             ...
Assets              Load balancer              App serversApplication              Database              Asynchronous proc...
1 instance for 100 hours            =100 instances for 1 hour
r    Balance cost/performance    Mix instance types for application servers,    databases, ancillary services, analytics e...
r    Migrate to large instance types    As your application grows    Use 64 bit from the outset, if possible
CALIBRATED FOR:v    IO performance
r    IO bound web applications are    more common    Application requires predictable, consistent IO
r    Provisioned throughput with    DynamoDB    No need to provision storage    Provision IO requirements:    reads and wr...
r    Scale up, and carry on    DynamoDB will manage resources to    achieve and maintain throughput
r    Low latency, unlimited scale    Writes acknowledged when saved to disk in    multiple data centres. Backed on SSDs.
...and SSDs for all
r    hi1.4xlarge instances    High capacity, high performance storage    2 x 1Tb SSD drives
r    Perfect match for databases    Relational and NoSQL storage
r    Perfect match for databases    Relational and NoSQL storage    90k to 120k IOPS
r    High performance network    10 gigabit ethernet    Placement groups    Perfect for distributed stores
OPTIMIZE   FOR                 COST S
r    Economies of scale    Drive down prices for customers    20 price drops in past 6 years
r    Maximize utilization    Greater utilization drives down cost
Utilization              Reserved capacity                                  Time
r    Reserved instances    Small upfront payment    Guaranteed capacity for 1 or 3 years    Lower hourly rate
r    Reserved instance resale    Sell your reservations on the resale market    Sellers set your own price    Buyers selec...
Utilization              Reserved capacity                                  Time
Utilization                On-demand              Reserved capacity                                  Time
Utilization                On-demand              Reserved capacity                                  Time
r    Spot instances    Name your price computing
r    Spot instances    Lower costs    ‘Overclock’ your app: more bang for your buck
Assets              Load balancer              App serversApplication              Database on SSDs              Asynchron...
Assets              Load balancer              App serversApplication              Database on SSDs              Asynchron...
Assets              Load balancer              App serversApplication              Database on SSDs              Asynchron...
r    Become price aware    Price is a driver of your architecture
r    Automated bidding    Automate bids based on on-demand price    Run on spot only when cost e!ective
r    Continuous cost optimization    Evaluate your reserved instance/on-demand/    spot mix regularly as app requirements ...
g   DECOUPLED5               patterns for                performance
SCALEg   DECOUPLED      OUT5               patterns for                performance
SCALEg   DECOUPLED      OUT    OPTIMIZE   FOR   COST S5               patterns for                performance
SCALE    g        DECOUPLED            OUT             OPTIMIZE   FOR   COST S      5                  patterns for       ...
SCALE    g        DECOUPLED            OUT             OPTIMIZE   FOR    COST S      5                  patterns for      ...
Thank youmatthew@amazon.com   aws.amazon.com       @mza
High Performance Web Applications
High Performance Web Applications
High Performance Web Applications
High Performance Web Applications
High Performance Web Applications
High Performance Web Applications
Upcoming SlideShare
Loading in...5
×

High Performance Web Applications

7,921

Published on

Building high performance web applications with Amazon Web Services.

Published in: Technology

High Performance Web Applications

  1. 1. High PerformanceWeb ApplicationsDr. Matt Woodmatthew@amazon.com@mza
  2. 2. Hello
  3. 3. Building blocks for wonderful applicationsStorage, compute, databases, managed services
  4. 4. Retail Merchant Web services services
  5. 5. Retail Merchant Web services services
  6. 6. H Getting started withAmazon Web Services quick review
  7. 7. H Utility computing Available at the end of an API call. Metered billing.
  8. 8. H Family of 20 services Adding new services and refinement weekly. Rapid rate of innovation.
  9. 9. H Undi!erentiated heavy lifting Focus on your app, customers and business
  10. 10. H
  11. 11. H aws.amazon.com Free account. Free tier.
  12. 12. rBuilding High Performance Web Applications
  13. 13. r Deliver a great experience to your customers. Responsive, fast web applications.
  14. 14. SCALE g DECOUPLED OUT OPTIMIZE FOR COST S 5 patterns for performancev CALIBRATED FOR: CPU performance v CALIBRATED FOR: IO performan ce C AUTOMATE
  15. 15. g DECOUPLED
  16. 16. Monolithic Mega System v2
  17. 17. AssetsApplication Analytics
  18. 18. AssetsApplication Analytics
  19. 19. r Images, javascript, stylesheets, HTML pages Deliver as fast as possible to customers
  20. 20. r Websites without the servers Highly durable: 99.999999999% Zero config: fire and forget
  21. 21. r Low latency delivery of assets Local caching for fast downloads Amazon CloudFront
  22. 22. PP
  23. 23. r Create content distributions From objects in S3 Any custom origin Dynamic, streaming and static content
  24. 24. P PP
  25. 25. r CNAME? Map to any custom URL assets.domain.com, www.domain.com
  26. 26. AssetsApplication Analytics
  27. 27. AssetsApplication Analytics
  28. 28. r Application architecture Small things, loosely coupled
  29. 29. AssetsApplication Analytics
  30. 30. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  31. 31. r Shared responsibility Infrastructure by AWS OS, application and data by customers Tools to help meet best practices
  32. 32. r Security groups Customer controlled firewalls All ports are closed by default
  33. 33. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  34. 34. Assets Load balancer x App serversApplication Database Asynchronous processing Analytics
  35. 35. r Decoupling provides an architectural framework for performance Easier to separate concerns: assets, streaming, etc. Easier to manage and scale.
  36. 36. SCALE OUT
  37. 37. r Elasticity is a tenet of the cloud Scale up when you need to Scale down when you don’t
  38. 38. r Predictable peaksDemand Capacity Time
  39. 39. r Predictable peaksDemand Capacity Time
  40. 40. r Variable usageDemand Capacity Time
  41. 41. r Variable usageDemand Capacity Time
  42. 42. r Variable usageDemand Time
  43. 43. r Horizontal scaling drives performance up ...and costs down
  44. 44. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  45. 45. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  46. 46. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  47. 47. r Amazon Machine Images encapsulate your app Customize your virtual machines AMI can be the unit of deployment
  48. 48. r 1. Spin up a new instance using your AMI Configured to bootstrap the app.
  49. 49. r 2. Pull down latest code base From S3 or code repository
  50. 50. r 3. Start up the app on the instance Ready to receive requests
  51. 51. r 4. Register with the load balancer Job done.
  52. 52. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  53. 53. r Horizontal scaling allows for fault tolerance
  54. 54. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  55. 55. Assets Load balancer :( App serversApplication Database Asynchronous processing Analytics
  56. 56. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  57. 57. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  58. 58. r Deploying and scaling a datastore Follow the same patterns: horizontal scale, availability, automation.
  59. 59. r One question: Does your application require a strict, controlled schema for query flexibility?
  60. 60. Does your application require a strict, controlled schemar for query flexibility? Yes Amazon Relational Database Service Management systems: CRM, ERP, finance
  61. 61. r Focus on your app Handles tedious database admin tasks Designed for availability
  62. 62. r Multi-engine MySQL, Oracle, Microsoft SQL Server Up and running in six clicks
  63. 63. r Point in time snapshots Automatic. Easy recovery.
  64. 64. r High availability Deployed across multiple availability zones. Synchronous writes.
  65. 65. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  66. 66. r Read replicas Perfect for read heavy applications. Asynchronous writes. Replication metrics available.
  67. 67. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  68. 68. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  69. 69. Does your application require a strict, controlled schemar for query flexibility? No Amazon DynamoDB Web apps, social apps, mobile apps, user generated content, unstructured data integration, lots of data.
  70. 70. r Focus on your app Managed NoSQL database service. No schema.
  71. 71. r Unlimited scale Unlimited storage Pay as you go
  72. 72. r High performance Single digit millisecond latencies
  73. 73. r Zero admin No instances to manage Tiny API, perfectly formed
  74. 74. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  75. 75. r Asynchronous processing Resize images. Transcode movies. Resample media.
  76. 76. r Follow the same best practices Decouple. Stateless. Horizontal scale.
  77. 77. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  78. 78. r CloudFront for dynamic content Edge caching for dynamic content Cache by query string parameters Multiple origin servers Persistent connections to origin servers
  79. 79. CAUTOMATE
  80. 80. r Automate everything The tedious. The time consuming. The error prone.
  81. 81. r For example: when increasing capacity Launch instance. Update application code. Register with load balancer.
  82. 82. r Auto-scaling CloudWatch Auto-scaling service Elastic Load Balancer
  83. 83. r Set operational thresholds Network capacity > 80% Memory utilization > 75% CPU < 50%
  84. 84. r Automatically respond to operational alarms Network capacity > 80%: add instances Memory utilization > 75%: add instances CPU < 50%: remove instances
  85. 85. r Set bounds Step change configured by number or percentage of instances
  86. 86. r Custom metrics Respond to custom metrics Page load time Database query time
  87. 87. r Automatic load balancer configuration Instances added/removed automatically Health check for running application before routing tra"c
  88. 88. r Stateless operations are important Decoupled, but stateless Instances are naive to other instances
  89. 89. r Treat your data as a royal garden Backup to S3: high durability Compute is a disposable resource
  90. 90. CALIBRATED FOR:v CPU performance
  91. 91. r Range of resources Choose the best instance type for performance
  92. 92. rt1.micro m1.small cc2.8xlarge
  93. 93. r High memory High CPU + memoryt1.micro m1.small High CPU cc2.8xlarge
  94. 94. Assets Load balancer App serversApplication Database Asynchronous processing Analytics
  95. 95. 1 instance for 100 hours =100 instances for 1 hour
  96. 96. r Balance cost/performance Mix instance types for application servers, databases, ancillary services, analytics etc.
  97. 97. r Migrate to large instance types As your application grows Use 64 bit from the outset, if possible
  98. 98. CALIBRATED FOR:v IO performance
  99. 99. r IO bound web applications are more common Application requires predictable, consistent IO
  100. 100. r Provisioned throughput with DynamoDB No need to provision storage Provision IO requirements: reads and writes per second
  101. 101. r Scale up, and carry on DynamoDB will manage resources to achieve and maintain throughput
  102. 102. r Low latency, unlimited scale Writes acknowledged when saved to disk in multiple data centres. Backed on SSDs.
  103. 103. ...and SSDs for all
  104. 104. r hi1.4xlarge instances High capacity, high performance storage 2 x 1Tb SSD drives
  105. 105. r Perfect match for databases Relational and NoSQL storage
  106. 106. r Perfect match for databases Relational and NoSQL storage 90k to 120k IOPS
  107. 107. r High performance network 10 gigabit ethernet Placement groups Perfect for distributed stores
  108. 108. OPTIMIZE FOR COST S
  109. 109. r Economies of scale Drive down prices for customers 20 price drops in past 6 years
  110. 110. r Maximize utilization Greater utilization drives down cost
  111. 111. Utilization Reserved capacity Time
  112. 112. r Reserved instances Small upfront payment Guaranteed capacity for 1 or 3 years Lower hourly rate
  113. 113. r Reserved instance resale Sell your reservations on the resale market Sellers set your own price Buyers select and check out
  114. 114. Utilization Reserved capacity Time
  115. 115. Utilization On-demand Reserved capacity Time
  116. 116. Utilization On-demand Reserved capacity Time
  117. 117. r Spot instances Name your price computing
  118. 118. r Spot instances Lower costs ‘Overclock’ your app: more bang for your buck
  119. 119. Assets Load balancer App serversApplication Database on SSDs Asynchronous processing Analytics
  120. 120. Assets Load balancer App serversApplication Database on SSDs Asynchronous processing Analytics
  121. 121. Assets Load balancer App serversApplication Database on SSDs Asynchronous processing Analytics
  122. 122. r Become price aware Price is a driver of your architecture
  123. 123. r Automated bidding Automate bids based on on-demand price Run on spot only when cost e!ective
  124. 124. r Continuous cost optimization Evaluate your reserved instance/on-demand/ spot mix regularly as app requirements change
  125. 125. g DECOUPLED5 patterns for performance
  126. 126. SCALEg DECOUPLED OUT5 patterns for performance
  127. 127. SCALEg DECOUPLED OUT OPTIMIZE FOR COST S5 patterns for performance
  128. 128. SCALE g DECOUPLED OUT OPTIMIZE FOR COST S 5 patterns for performance CALIBRATED FOR:v CPU performance CALIBRATED FOR: v IO performan ce
  129. 129. SCALE g DECOUPLED OUT OPTIMIZE FOR COST S 5 patterns for performancev CALIBRATED FOR: CPU performance v CALIBRATED FOR: IO performan ce C AUTOMATE
  130. 130. Thank youmatthew@amazon.com aws.amazon.com @mza
  1. A particular slide catching your eye?

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

×