High Availability  Websites 2        D r.   M AT T    WO O D  T E C H N O LO GY     E VA N G E L I S T
Part 2
AGENDA  High Performance Websites: Part 21. Availability2. Static content3. Multi-tier applications4 . Per formance boost5...
2. Dynamic ormulti-tier content
Ruby on Rails  PHP                          DjangoPerl        Dynamic                              SpringDatabase         ...
BlogsE-commerce              Gaming        DynamicProductivity                        Apps      Social networks
Elastic           Multiplecapacit           instance   y                sizes    Amazon EC2           On-          deman  ...
Masteri             Multiple  ng               availabilitfailure             y zones  High availability      Automation  ...
H I G H AVA I L A B I L I T Y W I T H E C 2Single server  fail over
Elastic IPEC2 instance
Elastic IPEC2 instanceEBS storageEBS snapshot
Elastic IPEC2 instanceEBS storageEBS snapshot
Elastic IPEC2 instanceEBS storageEBS snapshot
Elastic IPEC2 instanceEBS storageEBS snapshot
Cheap, but not ideal
Requires monitoring  and automation‘Hot swap’ possible
H I G H AVA I L A B I L I T Y W I T H E C 2   Horizontal  redundancy
Applications with  multiple tiers
Web serversApplication serversData store
Redundancy at  each tier
Web serversApplication serversData store
Tolerant toinstance failure
Web serversApplication serversData store
Tolerant toAZ failure
eu-west-1   eu-west-2                        Web servers                        Application servers                       ...
Scale in and out    (if you need to)
Web serversApplication serversData store
Load balance
Elastic Load BalancerWeb serversApplication serversData store
Let’s take a look!
Spin up a   LAMP stack        +Prepare for battle!
yum install apache  yum install php  yum install git git clone <app>
MySQL server with  Amazon RDS
Endpoint
Configure app +  cut an AMI
Create Image
Spin uphorizontal  layer
4
http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
Load balance
Elastic Load BalancerWeb serversAmazon RDS
Multiple AZdeployment
eu-west-1b
eu-west-1b
eu-west-1a
eu-west-1b
Elastic Load Balancereu-west-1a   eu-west-1b                          Web servers                          Amazon RDS
Recovery from   failure
Auto-healing & autoscaling
ELBCloudWatch Autoscaling
as-create-launch-config     PHPLaunchConfig     --image-id ami-132216677     --instance-type m1.large     --key amazon-web...
as-create-auto-scaling-group PHPScalingGroup --launch-configuration PHPLaunchConfig --availability-zones eu-west-1a, eu-we...
as-create-or-update-trigger        CPUUtlization        DiskReadBytes          DiskReadOps       DiskWriteBytes         Di...
Elastic Load Balancereu-west-1a   eu-west-1b                          Auto-scaling                          web servers   ...
Elastic Load Balancereu-west-1a   eu-west-1b                          Auto-scaling                          web servers   ...
H I G H AVA I L A B I L I T Y W I T H E C 2   Datastore   availability
Common singlepoint of failure
Performance bottleneck
Amazon RDS
Multi-AZfail over
Multi-AZ Deployment
Synchronous   writes
Monitored state
Automatic restore   on failure
Elastic Load Balancereu-west-1a   eu-west-1b                          Auto-scaling                          web servers   ...
H I G H AVA I L A B I L I T Y W I T H E C 2 Climbing the  Beanstalk
AWS Elastic Beanstalk
Automated,  managedinfrastructure
One clickdeployment
Let’s take a look...
http://mza-php.elasticbeanstalk.com
Created load balancer
Created Auto Scaling launch config
Created Auto Scaling group
Created Auto Scaling trigger
Launching EC2 instances
Adding to AS group and ELB
Application available
“Classic”infrastructure resources    under the hood
Apache Tomcat     +    JVM
No cost(only pay for resources in use)
Bring your own   datastore
Elastic Beanstalk                           Elastic Load Balancereu-west-1a    eu-west-1b                           Auto-s...
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
Horizontal layers  are flexible
Add caching
HTTP cacheWeb serversApplication serversData cacheData store
HTTP cacheWeb serversApplication serversData cacheData store
Varnish:HTTP reverse proxy
Memcached:key/value store
May requireapplication refactor
Amazon RDSread replicas
AGENDA    High Performance Websites1. Availability2. Static content3. Multi-tier applications4 . Per formance boost5. Summ...
Importance ofhigh availability
Hosting assets on  Amazon S3
Content distribution with Amazon CloudFront
Hosting static web content on S3 and CloudFront
Web applications on  Amazon EC2
Designing for availability
Multi-tier application        hosting
Database management  with Amazon RDS
One click deployment with AWS Elastic Beanstalk
Slides + videoavailable soon
Thank you!
Questions, comments:mawood@amazon.com        @mza         on Twitter
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
High Availability Websites: part two
Upcoming SlideShare
Loading in …5
×

High Availability Websites: part two

6,207 views

Published on

Slides from the recent AWS High Availability Websites online seminar. Part two, covering dynamic web application hosting on Amazon EC2 and AWS Elastic Beanstalk

Published in: Technology
0 Comments
16 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,207
On SlideShare
0
From Embeds
0
Number of Embeds
354
Actions
Shares
0
Downloads
105
Comments
0
Likes
16
Embeds 0
No embeds

No notes for slide
  • An introduction to elastic high performance computing.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • High Availability Websites: part two

    1. 1. High Availability Websites 2 D r. M AT T WO O D T E C H N O LO GY E VA N G E L I S T
    2. 2. Part 2
    3. 3. AGENDA High Performance Websites: Part 21. Availability2. Static content3. Multi-tier applications4 . Per formance boost5. Summar y
    4. 4. 2. Dynamic ormulti-tier content
    5. 5. Ruby on Rails PHP DjangoPerl Dynamic SpringDatabase Java Data store
    6. 6. BlogsE-commerce Gaming DynamicProductivity Apps Social networks
    7. 7. Elastic Multiplecapacit instance y sizes Amazon EC2 On- deman d
    8. 8. Masteri Multiple ng availabilitfailure y zones High availability Automation and monitoring
    9. 9. H I G H AVA I L A B I L I T Y W I T H E C 2Single server fail over
    10. 10. Elastic IPEC2 instance
    11. 11. Elastic IPEC2 instanceEBS storageEBS snapshot
    12. 12. Elastic IPEC2 instanceEBS storageEBS snapshot
    13. 13. Elastic IPEC2 instanceEBS storageEBS snapshot
    14. 14. Elastic IPEC2 instanceEBS storageEBS snapshot
    15. 15. Cheap, but not ideal
    16. 16. Requires monitoring and automation‘Hot swap’ possible
    17. 17. H I G H AVA I L A B I L I T Y W I T H E C 2 Horizontal redundancy
    18. 18. Applications with multiple tiers
    19. 19. Web serversApplication serversData store
    20. 20. Redundancy at each tier
    21. 21. Web serversApplication serversData store
    22. 22. Tolerant toinstance failure
    23. 23. Web serversApplication serversData store
    24. 24. Tolerant toAZ failure
    25. 25. eu-west-1 eu-west-2 Web servers Application servers Data store
    26. 26. Scale in and out (if you need to)
    27. 27. Web serversApplication serversData store
    28. 28. Load balance
    29. 29. Elastic Load BalancerWeb serversApplication serversData store
    30. 30. Let’s take a look!
    31. 31. Spin up a LAMP stack +Prepare for battle!
    32. 32. yum install apache yum install php yum install git git clone <app>
    33. 33. MySQL server with Amazon RDS
    34. 34. Endpoint
    35. 35. Configure app + cut an AMI
    36. 36. Create Image
    37. 37. Spin uphorizontal layer
    38. 38. 4
    39. 39. http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
    40. 40. http://ec2-46-137-20-114.eu-west-1.compute.amazonaws.com
    41. 41. Load balance
    42. 42. Elastic Load BalancerWeb serversAmazon RDS
    43. 43. Multiple AZdeployment
    44. 44. eu-west-1b
    45. 45. eu-west-1b
    46. 46. eu-west-1a
    47. 47. eu-west-1b
    48. 48. Elastic Load Balancereu-west-1a eu-west-1b Web servers Amazon RDS
    49. 49. Recovery from failure
    50. 50. Auto-healing & autoscaling
    51. 51. ELBCloudWatch Autoscaling
    52. 52. as-create-launch-config PHPLaunchConfig --image-id ami-132216677 --instance-type m1.large --key amazon-web --group "Web and SSH"
    53. 53. 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
    54. 54. as-create-or-update-trigger CPUUtlization DiskReadBytes DiskReadOps DiskWriteBytes DiskWriteOps NetworkIn NetworkOut DatabaseConnections FreeStorageSpace ReadLatency ReadThroughput SwapUsage WriteLatency
    55. 55. Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers Amazon RDS
    56. 56. Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers MySQL Amazon RDS
    57. 57. H I G H AVA I L A B I L I T Y W I T H E C 2 Datastore availability
    58. 58. Common singlepoint of failure
    59. 59. Performance bottleneck
    60. 60. Amazon RDS
    61. 61. Multi-AZfail over
    62. 62. Multi-AZ Deployment
    63. 63. Synchronous writes
    64. 64. Monitored state
    65. 65. Automatic restore on failure
    66. 66. Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers Amazon RDS
    67. 67. H I G H AVA I L A B I L I T Y W I T H E C 2 Climbing the Beanstalk
    68. 68. AWS Elastic Beanstalk
    69. 69. Automated, managedinfrastructure
    70. 70. One clickdeployment
    71. 71. Let’s take a look...
    72. 72. http://mza-php.elasticbeanstalk.com
    73. 73. Created load balancer
    74. 74. Created Auto Scaling launch config
    75. 75. Created Auto Scaling group
    76. 76. Created Auto Scaling trigger
    77. 77. Launching EC2 instances
    78. 78. Adding to AS group and ELB
    79. 79. Application available
    80. 80. “Classic”infrastructure resources under the hood
    81. 81. Apache Tomcat + JVM
    82. 82. No cost(only pay for resources in use)
    83. 83. Bring your own datastore
    84. 84. Elastic Beanstalk Elastic Load Balancereu-west-1a eu-west-1b Auto-scaling web servers Amazon RDS
    85. 85. 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
    86. 86. Horizontal layers are flexible
    87. 87. Add caching
    88. 88. HTTP cacheWeb serversApplication serversData cacheData store
    89. 89. HTTP cacheWeb serversApplication serversData cacheData store
    90. 90. Varnish:HTTP reverse proxy
    91. 91. Memcached:key/value store
    92. 92. May requireapplication refactor
    93. 93. Amazon RDSread replicas
    94. 94. AGENDA High Performance Websites1. Availability2. Static content3. Multi-tier applications4 . Per formance boost5. Summar y
    95. 95. Importance ofhigh availability
    96. 96. Hosting assets on Amazon S3
    97. 97. Content distribution with Amazon CloudFront
    98. 98. Hosting static web content on S3 and CloudFront
    99. 99. Web applications on Amazon EC2
    100. 100. Designing for availability
    101. 101. Multi-tier application hosting
    102. 102. Database management with Amazon RDS
    103. 103. One click deployment with AWS Elastic Beanstalk
    104. 104. Slides + videoavailable soon
    105. 105. Thank you!
    106. 106. Questions, comments:mawood@amazon.com @mza on Twitter

    ×