Building High-availability Websites on AWS

6,550 views

Published on

Published in: Technology
1 Comment
7 Likes
Statistics
Notes
  • Excellent slide deck matt. I have added my thoughts on AWS High Availability in the following article :
    http://harish11g.blogspot.in/2012/06/aws-high-availability-outage.html
    I feel it will be useful for the AWS community .
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
6,550
On SlideShare
0
From Embeds
0
Number of Embeds
546
Actions
Shares
0
Downloads
0
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide

Building High-availability Websites on AWS

  1. 1. High Availability Websites Matt Wood T E C H N O L O G Y E VA N G E L I S T
  2. 2. AGENDA High Performance Websites: Part 11. Availability2. Static content3. Multi-tier applications4 . Per formance boost5. Summar y
  3. 3. Spectrum of websites
  4. 4. Static DynamicSpectrum of websites
  5. 5. Static DynamicSimple Complex Spectrum of websites
  6. 6. Static DynamicSimple ComplexNiche Mass market Spectrum of websites
  7. 7. Availability is important
  8. 8. Support your customers
  9. 9. Support your business
  10. 10. However...
  11. 11. “Everything fails all the time ” Werner Vogels, Amazon CTO
  12. 12. Infrastructure services cansave the day
  13. 13. Focus on your stuff
  14. 14. Patterns foravailability
  15. 15. 1. Static content
  16. 16. ImagesStylesheets Streaming content Assets Video Javascript
  17. 17. Templates ImagesStylesheets Streaming content Webpages Assets Blog posts Video Javascript PDFs
  18. 18. High Highredundancy availability Amazon S3 High durability
  19. 19. http://s3.amazonaws.com/bucketname/objectid http://bucketname.s3.amazonaws.com/objectid
  20. 20. https://s3.amazonaws.com/bucketname/objectidhttps://bucketname.s3.amazonaws.com/objectid
  21. 21. Perfect for asset hosting
  22. 22. Perfect for website hosting
  23. 23. Let’s see how...
  24. 24. aws.amazon.com/console
  25. 25. Make everything public
  26. 26. index.html Texthttp://mza.s3.amazon.com/site/index.html
  27. 27. https://mza.s3.amazon.com/site/index.html
  28. 28. https://mza.s3.amazon.com/site/index.html
  29. 29. :(
  30. 30. Unfriendly, brittle URL:http://mza.s3.amazonaws.com/s3/index.html
  31. 31. S3 websites
  32. 32. Root objects
  33. 33. Error pages
  34. 34. Let’s see how...
  35. 35. https://my-website.s3-website-eu-west-1.amazon.com
  36. 36. https://my-website.s3-website-eu-west-1.amazon.com
  37. 37. Contentdistribution
  38. 38. Increased latency
  39. 39. CloudFrontPowerful content delivery network
  40. 40. Global edge caching + Friendly URLs
  41. 41. Let’s see how!
  42. 42. d19r58gd5nvk1.cloudfront.net
  43. 43. d19r58gd5nvk1.cloudfront.net/site/index.html
  44. 44. UpdateDNS CNAME
  45. 45. friendly-example.com/index.html
  46. 46. Set CloudFrontDefault Root Object
  47. 47. API or S3 client
  48. 48. CloudBerry Explorer API or S3 client Cyberduck
  49. 49. amazon_s3.html
  50. 50. friendly-example.com
  51. 51. friendly-example.com Global DNS CNAME Global Amazon CloudFront Regional Amazon S3 Redundant storage
  52. 52. 2. Dynamic ormulti-tier content
  53. 53. Ruby on Rails PHP DjangoPerl Dynamic SpringDatabase Java Data store
  54. 54. BlogsE-commerce Gaming DynamicProductivity Apps Social networks
  55. 55. Elastic Multiplecapacity instance sizes Amazon EC2 On-demand
  56. 56. Mastering Multiple failure availability zones High availability Automation and monitoring
  57. 57. H I G H AVA I L A B I L I T Y W I T H E C 2Single server fail over
  58. 58. Elastic IPEC2 instance
  59. 59. Elastic IPEC2 instanceEBS storageEBS snapshot
  60. 60. Elastic IPEC2 instanceEBS storageEBS snapshot
  61. 61. Elastic IPEC2 instanceEBS storageEBS snapshot
  62. 62. Elastic IPEC2 instanceEBS storageEBS snapshot
  63. 63. Cheap, but not ideal
  64. 64. Requires monitoring and automation‘Hot swap’ possible
  65. 65. H I G H AVA I L A B I L I T Y W I T H E C 2 Horizontal redundancy
  66. 66. Applications with multiple tiers
  67. 67. Web serversApplication serversData store
  68. 68. Redundancy at each tier
  69. 69. Web serversApplication serversData store
  70. 70. Tolerant toinstance failure
  71. 71. Web serversApplication serversData store
  72. 72. Tolerant toAZ failure
  73. 73. eu-west-1 eu-west-2 Web servers Application servers Data store
  74. 74. Scale in and out (if you need to)
  75. 75. Web serversApplication serversData store
  76. 76. Load balance
  77. 77. Elastic Load BalancerWeb serversApplication serversData store
  78. 78. Let’s take a look!
  79. 79. Spin up your stack +Prepare for battle!
  80. 80. MySQL server with Amazon RDS
  81. 81. Endpoint
  82. 82. Configure app + cut an AMI
  83. 83. Create Image
  84. 84. Spin uphorizontal layer
  85. 85. 4
  86. 86. http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
  87. 87. http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
  88. 88. Load balance
  89. 89. Elastic Load BalancerWeb serversAmazon RDS
  90. 90. Elastic Load BalancerWeb serversAmazon RDS
  91. 91. Multiple AZdeployment
  92. 92. Elastic Load Balancereu-west-1a eu-west-1b Web servers Amazon RDS
  93. 93. eu-west-1b
  94. 94. eu-west-1b
  95. 95. eu-west-1a
  96. 96. eu-west-1b
  97. 97. Elastic Load Balancereu-west-1a eu-west-1b Web servers Amazon RDS
  98. 98. Recovery from failure
  99. 99. Autohealing & autoscaling
  100. 100. ELBCloudWatch Autoscaling
  101. 101. Elastic Load Balancer Autoscaling groupMetrics CloudWatch
  102. 102. Elastic Load Balancer Autoscaling groupMetrics CloudWatch
  103. 103. Elastic Load Balancer Autoscaling groupMetrics CloudWatch Autoscaling service
  104. 104. Elastic Load Balancer Autoscaling groupMetrics CloudWatch Autoscaling service
  105. 105. Elastic Load Balancer Autoscaling groupMetrics CloudWatch Autoscaling service
  106. 106. as-create-launch-config PHPLaunchConfig --image-id ami-132216677 --instance-type m1.large --key amazon-web --group "Web and SSH"
  107. 107. as-create-auto-scaling-group PHPScalingGroup --launch-configuration PHPLaunchConfig --availability-zones eu-west-1a, eu-west-1b --min-size 10 --max-size 10 --load-balancers lamp-load-balancer
  108. 108. as-create-or-update-trigger CPUUtlization DiskReadBytes DiskReadOps DiskWriteBytes DiskWriteOps NetworkIn NetworkOut DatabaseConnections FreeStorageSpace ReadLatency ReadThroughput SwapUsage WriteLatency
  109. 109. Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers Amazon RDS
  110. 110. Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers MySQL Amazon RDS
  111. 111. Extra I G H A V A I L A B I L I T Y W I T H E C 2 Hcredit! Performance
  112. 112. Horizontal layers are flexible
  113. 113. Add caching
  114. 114. HTTP cacheWeb serversApplication serversData cacheData store
  115. 115. HTTP cacheWeb serversApplication serversData cacheData store
  116. 116. Varnish:HTTP reverse proxy
  117. 117. Memcached:key/value store
  118. 118. May requireapplication refactor
  119. 119. AGENDA High Performance Websites1. Availability2. Static content3. Multi-tier applications4 . Per formance boost5. Summar y
  120. 120. Importance ofhigh availability
  121. 121. Hosting assets on Amazon S3
  122. 122. Content distribution with Amazon CloudFront
  123. 123. Hosting static web content on S3 and CloudFront
  124. 124. Web applications on Amazon EC2
  125. 125. Designing for availability
  126. 126. Multi-tier application hosting
  127. 127. Database management with Amazon RDS
  128. 128. Slides + videoavailable soon
  129. 129. Thank you!
  130. 130. Q U E S T I O N S + C O M M E N T Smatthew@amazon.com @mza O N T W I T T E R

×