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.

Scalable, Highly-Available WordPress on AWS

1,052 views

Published on

Here's the full talk: https://wordpress.tv/2017/12/10/nathaniel-schweinberg-scalable-highly-available-wordpress-on-aws/

WordPress at its heart is a blogging platform, designed to serve a site that’s largely read-only. Logging in isn’t necessary unless you’re an admin looking to write a blog post or adjust settings. This is a good thing! Scaling a site that’s predominantly read-only is very easy because you can place a CDN like CloudFront or a page cache like Varnish in front of a single server and serve many, many requests from hardware as cheap as $5 per month.

But what happens when you have a site that isn’t read-only? What happens when you have, for example, a WooCommerce site with a couple hundred transactions a day? Or perhaps you run a news site with millions of pageviews a month? All of a sudden, that poor $5 server is catching on fire and asking what it did to deserve this!

Running a single server like this is called a “Single Point of Failure” and that is a very big no-no to run in a production environment. Cloud servers are ephemeral in nature and aren’t guaranteed to stay up 100% of the time. Any number of things can go wrong, which is why designing your infrastructure to respond to bursts of traffic as well as be able to continue serving requests when servers go down is paramount to a reliable production environment.

This talk will give an overview of what is involved from moving from a single-server setup to a scalable, highly-available infrastructure on AWS.

Published in: Internet
  • Be the first to comment

Scalable, Highly-Available WordPress on AWS

  1. 1. Scalable, Highly-Available WordPress on AWS Nathaniel Schweinberg
  2. 2. Scalability refers to the ability of an infrastructure to change its size on-demand.
  3. 3. Vertical Scaling Increase a server’s CPU, Memory, or Disk Space
  4. 4. Horizontal Scaling Add more servers to your infrastructure
  5. 5. High Availability refers to an infrastructure’s ability to continue serving requests when resources are no longer available.
  6. 6. https://humans-eat-cake.com (Most basic hosting environments)
  7. 7. https://humans-eat-cake.com
  8. 8. https://humans-eat-cake.com
  9. 9. A Single Point of Failure refers to a resource or access point that, if it fails, prevents the application from serving requests.
  10. 10. https://humans-eat-cake.com
  11. 11. https://humans-eat-cake.com
  12. 12. https://humans-eat-cake.com
  13. 13. Overwhelming load & Servers failing Two Problems a growing site faces
  14. 14. Let’s solve these problems!
  15. 15. Assumption: not using Docker
  16. 16. Challenge: Using a single server is a SPoF. How do we route traffic to more than one server using one domain?
  17. 17. Solution: Elastic Load Balancers.
  18. 18. https://humans-eat-cake.com
  19. 19. Challenge: We need to deploy our application. How do we deploy our code to multiple servers at the same time?
  20. 20. Solution: CodeDeploy.
  21. 21. Challenge: The database lives on a single instance which is a SPof. How do we ensure the database is highly-available?
  22. 22. Solution: RDS with Multi-AZ enabled.
  23. 23. us-east-1a us-east-1b us-east-1c
  24. 24. us-east-1a us-east-1b us-east-1c
  25. 25. us-east-1a us-east-1b us-east-1c
  26. 26. us-east-1a us-east-1b us-east-1c
  27. 27. us-east-1a us-east-1b us-east-1c
  28. 28. Challenge: Our site hits /r/all and we’re flooded with traffic. How do we respond to traffic without manual intervention?
  29. 29. Solution: EC2 AutoScaling Groups.
  30. 30. Challenge: We are running multiple servers behind a load balancer and need to make changes to a server’s config. How do we ensure changes made to one server propagate to the others?
  31. 31. Solution: AMI’s. (Amazon Machine Images)
  32. 32. Challenge: As traffic increases, the database gets overwhelmed with queries. How do we minimize queries to the database, while still serving fresh content?
  33. 33. Solution: ElastiCache.
  34. 34. More questions to ask: How do I automate building AMI’s? How do you spin up infrastructure? How do you reduce server load?
  35. 35. Thanks

×