Scaling for High Traffic Sites
scalewp.io
About
Drew Gorton
Web Developer, Various (1998-2001)
CEO, Gorton Studios (2001-2015)
Product Owner, NodeSquirrel (2012-2015)
Director of Agency and Community Outreach, Pantheon (Current)
drew@pantheon.io
@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 Caching
Challenges & 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 Cache
Challenges & 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
Performance
Challenges & 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
Performance
Challenges & 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 Architecture
Horizontal Scalability Is the Scalability That Matters
Traditional Options
Shared vs VM vs Cluster
Traditional Options at Scale
In Real Life
Next Generation Architecture
The 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

Word Press at Scale - WordCamp Minneapolis