Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014

15,898 views

Published on

Magento is a leading open source, eCommerce platform used by many global brands. However, architecting your Magento platform to grow with your business can sometimes be a challenge. This session walks through the steps needed to take an out-of-the-box, single-node Magento implementation and turn it into a highly available, elastic, and robust deployment. This includes an end-to-end caching strategy that provides an efficient front-end cache (including populated shopping carts) using Varnish on Amazon EC2 as well as offloading the Magento caches to separate infrastructure such as Amazon ElastiCache. We also look at strategies to manage the Magento Media library outside of the application instances, including EC2-based shared storage solutions and Amazon S3. At the data layer we look at Magento-specific Amazon RDSandndash;tuning strategies including configuring Magento to use read replicas for horizontal scalability. Finally, we look at proven techniques to manage your Magento implementation at scale, including tips on cache draining, appropriate cache separation, and utilizing AWS CloudFormation to manage your infrastructure and orchestrate predictable deployments.

Published in: Technology

(WEB304) Running and Scaling Magento on AWS | AWS re:Invent 2014

  1. 1. November 14, 2014 | Las Vegas, NV Shaun Pearce, Solutions Architect, AWS Zachary Stevens, Chief Architect, Elastera
  2. 2. 40% 40% of shoppers abandon a site that takes more than 3 seconds to load Source: blog.kissmetrics.com/loading-time/
  3. 3. 79% 79% of shoppers who are dissatisfied with site performance are less likely to buy from the same site again Source: blog.kissmetrics.com/loading-time/
  4. 4. November
  5. 5. SALE ENDS SOON visit example.com/sale
  6. 6. http://youtu.be/xbuiIwEOCAs
  7. 7. Bottleneck
  8. 8. Bottleneck
  9. 9. Magento instance Master Slave Master Slave Master Slave
  10. 10. Bottleneck
  11. 11. Bottleneck
  12. 12. HTTP cache server (10.0.0.1) Varnish Magento 10.0.1.1 10.0.1.2 10.0.1.3 Internal load balancer Magento Magento User External load balancer default.vcl example.us-east-1.elb.amazonaws.com
  13. 13. Varnish HTTP cache server (10.0.0.1) 10.0.1.1 Magento Internal load balancer User External load balancer default.vcl 10.0.1.1
  14. 14. Varnish HTTP cache server (10.0.0.1) Magento Magento Magento 10.0.2.3 10.0.2.4 10.0.2.5 User External load balancer default.vcl 10.0.2.3 10.0.2.4 10.0.2.5
  15. 15. Varnish HTTP cache server (10.0.0.1) Magento Magento Magento User External load balancer 10.0.2.3 10.0.2.4 10.0.2.5 default.vcl 10.0.2.3 10.0.2.4 10.0.2.5 10.0.2.6
  16. 16. HTTP cache server (10.0.0.1) Varnish Nginx default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  17. 17. HTTP cache server (10.0.0.1) Varnish Nginx default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  18. 18. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  19. 19. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User Externalload balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internalload balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  20. 20. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  21. 21. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  22. 22. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  23. 23. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  24. 24. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  25. 25. HTTP cache server (10.0.0.1) Varnish default.vcl localhost:8080 User External load balancer Magento 10.0.1.1 10.0.1.2 10.0.1.3 Nginx Internal load balancer Magento Magento nginx.conf example.us- east- 1.elb.amazonaws.com
  26. 26. SaaS BEST OF BOTH DIY No headaches Predictable cost Lower TCO Headaches Spiraling cost High TCO Renting Constraints Ownership Freedom Ownership Freedom Less headaches Lower Cost
  27. 27. RUNMANAGEEVOLVE
  28. 28. Availability Zone Availability Zone Magento Admin Primary Read Rep Magento Magento Magento Auto Scaling group Magento Magento Magento Media CDN Static CDN Media S3
  29. 29. Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento
  30. 30. Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento
  31. 31. Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento
  32. 32. Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento Magento Admin Primary CloudFront Amazon S3 Auto Scaling group Magento Magento Magento
  33. 33. QUALITY from code
  34. 34. log_bin_trust_function_creators
  35. 35. •local.xml Configuration •Magentocode Website •Apache, PHP •Chef, NewRelic System software •Amazon Linux Base OS
  36. 36. •local.xml Configuration •Magentocode Website •Apache, PHP •Chef, NewRelic System software •Amazon Linux Base OS
  37. 37. PROACTIVELY
  38. 38. •local.xml Configuration •Magentocode Website •Apache, PHP •Chef, NewRelic System software •Amazon Linux Base OS
  39. 39. •local.xml Configuration •Magentocode Website •Apache, PHP •Chef, NewRelic System software •Amazon Linux Base OS
  40. 40. Magento Admin Auto Scaling group Magento Magento Magento Admin Auto Scaling group Magento Magento Live Deploy server Staging Developer Deploy bucket
  41. 41. Magento Admin Auto Scaling group Magento Magento Magento Admin Auto Scaling group Magento Magento Live Deploy server Staging Developer Deploy bucket
  42. 42. Magento Admin Auto Scaling group Magento Magento Magento Admin Auto Scaling group Magento Magento Live Deploy server Staging Developer Deploy bucket
  43. 43. PUSH
  44. 44. where are you
  45. 45. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Magento Admin Auto Scaling group Magento Magento Staging Developer
  46. 46. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Developer Magento Admin Auto Scaling group Magento Magento Staging
  47. 47. UPGRADE
  48. 48. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Developer Magento Admin Auto Scaling group Magento Magento Staging
  49. 49. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Developer Magento Admin Auto Scaling group Magento Magento Staging
  50. 50. Note
  51. 51. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Developer Magento Admin Auto Scaling group Magento Magento Staging
  52. 52. Magento Admin Auto Scaling group Magento Magento Deploy bucket Live Deploy server Developer Magento Admin Auto Scaling group Magento Magento Staging
  53. 53. http://bit.ly/awsevals

×