Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Scaling the Unscalable

Scaling the Unscalable

A primer on scaling WordPress websites for high traffic environments.

by Koen Van den Wijngaert
NEOK IT BV

8592f54ed57e8948e890308f6302054a?s=128

Koen Van den Wijngaert

September 10, 2020
Tweet

Transcript

  1. Scaling the unscalable A primer on scaling WordPress websites for

    high traffic environments NEOK 10.09.2020 by Koen Van den Wijngaert NEOK IT BV
  2. You probably don't need to scale Getting the basics right

    NEOK 10.09.2020 01.
  3. First make it run smooth. • External resources: database, APIs,

    … • Environment a. Neighbors? b. Hardware? c. Settings? d. Topology? • Network: traffic & connections • Disk vs. Memory • Slow and/or compute-heavy tasks Finding bottlenecks. NEOK Getting the basics right
  4. First make it run smooth. • Optimize your database •

    Be nice to your web server • The browser is your friend • Try some page caching • Use caching for dynamic content a. Object caching, database caching and transients b. Storage mechanisms Start small. NEOK Getting the basics right
  5. Not enough? So you want to scale your WP? Vertically

    Horizontally NEOK 10.09.2020 02.
  6. NEOK Scaling your WP

  7. Horizontal scaling • Application • Database • Web server (+

    reverse proxy) • Media server • Search Splitting your set-up into separate components NEOK Scaling your WP
  8. Going all-in Going for an horizontally scalable, highly available &

    elastic architecture NEOK 10.09.2020 03.
  9. High availability No single points of failure. NEOK Going all-in

  10. Elastic architecture Adding some extra oomph during peak moments NEOK

    Going all-in
  11. An example setup ...Easy, right? NEOK Going all-in

  12. Challenges of HA There's always a catch! Load balancing Shared

    media Consistency NEOK 10.09.2020 04.
  13. Load balancing NEOK Challenges of HA

  14. NEOK Challenges of HA Shared media

  15. NEOK Challenges of HA Consistency

  16. Keeping track of it all Knowledge is power. NEOK 10.09.2020

    05.
  17. None
  18. Monitoring

  19. Logging and gathering metrics Why you need it NEOK Keeping

    track of it all • Monitoring • Alerting • Performance tuning • (Post-mortem) analysis
  20. We need a way to expose metrics about running services,

    and a method for gathering and storing them in a way we can actually make sense of it later. We need to display this data graphically in some sort of dashboard. NEOK Keeping track of it all
  21. Metrics NEOK Keeping track of it all Gathering • Stackdriver

    (GCM) • Prometheus • New Relic Displaying • Google Cloud Monitoring • Grafana • Kibana Exposing • http endpoints • mysql queries • telnet interfaces • ...
  22. But wait... How do we keep track of it all?

    Abstraction! Containers Orchestrators NEOK 10.09.2020 06.
  23. Containers NEOK Keeping track of it all

  24. Orchestrators Cluster management is hard. NEOK Keeping track of it

    all • Infrastructure management (provisioning and scaling) • Life cycle management (starting, stopping & upgrading applications, health probes) • Auto scaling based on demand • Keeping track of services (networking/load balancing) • Running one-off processes • Persistent storage • Managing state • Sharing configuration • Sharing secrets
  25. One orchestrator to rule them all* NEOK Keeping track of

    it all * Please know what you’re getting yourself into.
  26. Thank you & goodbye! Koen Van den Wijngaert NEOK IT

    BV @vdwijgaert /vdwijngaert NEOK 10.09.2020
  27. NEOK Keeping track of it all