Upload
drew-gorton
View
58
Download
0
Embed Size (px)
Citation preview
Scaling for High Traffic Sites
scalewp.io
About
Drew GortonWeb Developer, Various (1998-2001)CEO, Gorton Studios (2001-2015)Product Owner, NodeSquirrel (2012-2015)Director of Agency and Community Outreach, Pantheon (Current)
[email protected]@dgorton
Why Scale Matters
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Page Caching
Page Caching
Page CachingChallenges & Takeaways
● Cache TTL and Expiration● Fragment caching● Cookies
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Object Caching
An object cache speeds up PHP execution time while lessening the load on the database.
Object CacheChallenges & Takeaways
● Complexity● Invalidation● Optimization● Eviction
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Query Performance
Query PerformanceChallenges & Takeaways
● Query routing● Replication lag● Debuggability● Regressions
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Algorithm Performance
Algorithm PerformanceChallenges & Takeaways
● Mo’ data, Mo’ problems.● Test with big data sets to find
problems before they hit production.
● Avoid bloating the DOM / blowing up the UX.
● Load data as you need it.
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Searching for Scale
Use a dedicated search index like Apache Solr or ElasticSearch
Searching for Scale
Challenge & Takeaways
● Overriding WP_Query()● Index Rebuilds● Complexity
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Elastic ArchitectureHorizontal Scalability Is the Scalability That Matters
Traditional OptionsShared vs VM vs Cluster
Traditional Options at ScaleIn Real Life
Next Generation ArchitectureThe Same Design, Just Add More
Elastic Architecture
Challenges and Takeaways
● Load balancing● Shared media● Consistency
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
Development & Workflow
Development & Workflow
Development Workflow
Challenges & Takeaways
● Environmental consistency● Site configuration● Local development● Automation
Today’s Topics
● Page Caching
● Object Caching
● Query Performance
● Algorithm Performance
● Searching for Scale
● Elastic Architecture
● Development and Workflow
● A Real-World Scalable Architecture
A modern stack:
● Reverse proxy (e.g. Varnish)● Apache or Nginx● PHP● Memcached or Redis● MySQL and Database
Replication● ElasticSearch or Solr● Linux● Version control (Git)● CI server
If you don’t want to do it all on your own...
Learn more on scalewp.io
Questions?
Drew Gorton@dgorton