Your SlideShare is downloading. ×
High Performance Web Applications
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

High Performance Web Applications

7,560
views

Published on

Building high performance web applications with Amazon Web Services.

Building high performance web applications with Amazon Web Services.

Published in: Technology

0 Comments
16 Likes
Statistics
Notes
  • Be the first to comment

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