1. 170 Radio Stations :: WordPress at Scale
Peter Chester
@peterchester
MODERN TRIBE http://tri.be
2. Hi, I’m Peter.
I like to build really big WordPress Projects...
★ GigaOm Network 2010 redesign/rebuild
★ 80+ radio stations & 5 national sites for InteractiveOne
★ 170+ radio stations & 3 national sites for TownSquare
MODERN TRIBE http://tri.be
4. But wait, there’s more...
We also do a lot more than WordPress. We coordinate teams of
freelancers to design and build cool stuff for high-end clients of
MODERN TRIBE http://tri.be
5. Who Knew?
It turns out that scaling a site involves a lot more than simply
accounting for web traffic.
MODERN TRIBE http://tri.be
6. You Know You’ve Failed at Scaling When...
MODERN TRIBE http://tri.be
7. You Know You’ve Failed at Scaling When...
★ You have to re-save permalinks... for each of the blogs on
your 170 blog network.
MODERN TRIBE http://tri.be
8. You Know You’ve Failed at Scaling When...
★ You have to re-save permalinks... for each of the blogs on
your 170 blog network.
★ You can’t code anymore because all you ever do is answer
URGENT emails.
MODERN TRIBE http://tri.be
9. You Know You’ve Failed at Scaling When...
★ You have to re-save permalinks... for each of the blogs on
your 170 blog network.
★ You can’t code anymore because all you ever do is answer
URGENT emails.
★ Your database quits because it is BIGGER than your server.
MODERN TRIBE http://tri.be
10. What the #%*@ is “Scale” Anyway?
MODERN TRIBE http://tri.be
11. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
MODERN TRIBE http://tri.be
12. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
★ Ability to deal with tons of file uploads
MODERN TRIBE http://tri.be
13. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
★ Ability to deal with tons of file uploads
★ And tons of data in the database
MODERN TRIBE http://tri.be
14. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
★ Ability to deal with tons of file uploads
★ And tons of data in the database
★ Ability to rapidly deploy lots of blogs
MODERN TRIBE http://tri.be
15. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
★ Ability to deal with tons of file uploads
★ And tons of data in the database
★ Ability to rapidly deploy lots of blogs
★ A systematized process for quality assurance
MODERN TRIBE http://tri.be
16. What the #%*@ is “Scale” Anyway?
★ Ability to handle high web traffic
★ Ability to deal with tons of file uploads
★ And tons of data in the database
★ Ability to rapidly deploy lots of blogs
★ A systematized process for quality assurance
★ A dummy proof admin interface
MODERN TRIBE http://tri.be
17. What the #%*@ is “Scale” Anyway?
MODERN TRIBE http://tri.be
18. What the #%*@ is “Scale” Anyway?
Scale is all about the ability to manage growth.
MODERN TRIBE http://tri.be
19. Cliffs Notes on Scaling
Obviously, scaling is an enormous
MODERN TRIBE http://tri.be
20. Cliffs Notes on Scaling
Obviously, scaling is an enormous
★ Architecting for Scale
MODERN TRIBE http://tri.be
21. Cliffs Notes on Scaling
Obviously, scaling is an enormous
★ Architecting for Scale
★ Caching and Optimization
MODERN TRIBE http://tri.be
22. Cliffs Notes on Scaling
Obviously, scaling is an enormous
★ Architecting for Scale
★ Caching and Optimization
★ Managing the Project
MODERN TRIBE http://tri.be
23. Cliffs Notes on Scaling
Obviously, scaling is an enormous
★ Architecting for Scale
★ Caching and Optimization
★ Managing the Project
★ Questions & Answers
MODERN TRIBE http://tri.be
25. The Basics Setup
★ WordPress MU
★ Domain Mapping Plugin
★ WP Replicator & Duplicate Post Plugins
MODERN TRIBE http://tri.be
26. Dummy Proof Your Admin
We like to modify the wp-admin UI to hide unwanted menus so
that people don’t accidentally click the wrong button.
MODERN TRIBE http://tri.be
27. Dummy Proof Your Admin
We like to modify the wp-admin UI to hide unwanted menus so
that people don’t accidentally click the wrong button.
MODERN TRIBE http://tri.be
28. Pick Your Favorite Flavor
We often use a “Flavor” management approach.
Instead of offering tons of themes, we offer one or two but
make them highly configurable in terms of fonts, colors, and
branding.
MODERN TRIBE http://tri.be
29. Pick Your Favorite Flavor
We often use a “Flavor” management approach.
Instead of offering tons of themes, we offer one or two but
make them highly configurable in terms of fonts, colors, and
branding.
MODERN TRIBE http://tri.be
32. CAUTION!!!
★ Avoid server requests to external servers
MODERN TRIBE http://tri.be
33. CAUTION!!!
★ Avoid server requests to external servers
★ Avoid requests back to the internal server via
CURL or even via javascript
MODERN TRIBE http://tri.be
34. CAUTION!!!
★ Avoid server requests to external servers
★ Avoid requests back to the internal server via
CURL or even via javascript
★ Avoid RSS widgets or RSS syndication
across the network
MODERN TRIBE http://tri.be
35. CAUTION!!!
★ Avoid server requests to external servers
★ Avoid requests back to the internal server via
CURL or even via javascript
★ Avoid RSS widgets or RSS syndication
across the network
★ Avoid hand coded sql queries
MODERN TRIBE http://tri.be
36. CAUTION!!!
★ Avoid server requests to external servers
★ Avoid requests back to the internal server via
CURL or even via javascript
★ Avoid RSS widgets or RSS syndication
across the network
★ Avoid hand coded sql queries
★ Avoid switch_to_blog()
MODERN TRIBE http://tri.be
37. CAUTION!!!
★ Avoid server requests to external servers
★ Avoid requests back to the internal server via
CURL or even via javascript
★ Avoid RSS widgets or RSS syndication
across the network
★ Avoid hand coded sql queries
★ Avoid switch_to_blog()
★ Cache everything you can
MODERN TRIBE http://tri.be
41. What is Cache???
How many seconds are there in 10 years?
MODERN TRIBE http://tri.be
42. What is Cache???
How many seconds are there in 10 years?
10 x 365 x 24 x 60 x 60 =
MODERN TRIBE http://tri.be
43. What is Cache???
How many seconds are there in 10 years?
10 x 365 x 24 x 60 x 60 =
315,360,000
MODERN TRIBE http://tri.be
44. What is Cache???
How many seconds are there in 10 years?
10 x 365 x 24 x 60 x 60 =
315,360,000
How many seconds are there in 10 years?
MODERN TRIBE http://tri.be
45. What is Cache???
How many seconds are there in 10 years?
10 x 365 x 24 x 60 x 60 =
315,360,000
How many seconds are there in 10 years?
Now how many seconds are there in 10 years?
MODERN TRIBE http://tri.be
46. What is Cache???
How many seconds are there in 10 years?
10 x 365 x 24 x 60 x 60 =
315,360,000
How many seconds are there in 10 years?
Now how many seconds are there in 10 years?
Ok.... what about now?
MODERN TRIBE http://tri.be
47. This Is Your Server
Typically, your server setup is pretty basic.
MODERN TRIBE http://tri.be
48. This Is Your Server
Typically, your server setup is pretty basic.
Browser
MODERN TRIBE http://tri.be
49. This Is Your Server
Typically, your server setup is pretty basic.
Browser
MODERN TRIBE http://tri.be
50. This Is Your Server
Typically, your server setup is pretty basic.
Web
Browser
Server
MODERN TRIBE http://tri.be
51. This Is Your Server
Typically, your server setup is pretty basic.
Web
Browser
Server
MODERN TRIBE http://tri.be
52. This Is Your Server
Typically, your server setup is pretty basic.
Web
Browser DB
Server
MODERN TRIBE http://tri.be
53. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
MODERN TRIBE http://tri.be
54. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Browser
MODERN TRIBE http://tri.be
55. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Browser
MODERN TRIBE http://tri.be
56. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Load
Browser
Balance
MODERN TRIBE http://tri.be
57. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Load
Browser
Balance
MODERN TRIBE http://tri.be
58. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
MODERN TRIBE http://tri.be
59. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
MODERN TRIBE http://tri.be
60. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
MODERN TRIBE http://tri.be
61. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
MODERN TRIBE http://tri.be
62. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
DB
Servers
Servers
Servers
MODERN TRIBE http://tri.be
63. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
DB
Servers
Servers
Servers
MODERN TRIBE http://tri.be
64. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
Object DB
Servers
Servers
Cache Servers
MODERN TRIBE http://tri.be
65. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
Object DB
Servers
Servers
Cache Servers
MODERN TRIBE http://tri.be
66. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
CDN VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
Object DB
Servers
Servers
Cache Servers
MODERN TRIBE http://tri.be
67. This Is Your Server On Drugs
The goal is to reduce the load on PHP and mysql by delegating
wherever possible.
Varnish
arnish
CDN VVarnish
Servers s
r
Serve
Servers
Load
Browser
Balance
Web
Web
Web
Servers
Servers
Servers
DB
DB
Object DB
Servers
Servers
Cache Servers
MODERN TRIBE http://tri.be
74. Lighten the Load
★ CDN integration (Origin Pull)
MODERN TRIBE http://tri.be
75. Lighten the Load
★ CDN integration (Origin Pull)
★ Dynamic image resizing to save disk space
MODERN TRIBE http://tri.be
76. Lighten the Load
★ CDN integration (Origin Pull)
★ Dynamic image resizing to save disk space
★ CSS and Javascript minification and consolidation
MODERN TRIBE http://tri.be
77. Lighten the Load
★ CDN integration (Origin Pull)
★ Dynamic image resizing to save disk space
★ CSS and Javascript minification and consolidation
★ Shared uploads across many servers (NFS or Rsync)
MODERN TRIBE http://tri.be
78. Lighten the Load
★ CDN integration (Origin Pull)
★ Dynamic image resizing to save disk space
★ CSS and Javascript minification and consolidation
★ Shared uploads across many servers (NFS or Rsync)
★ Headers tuned for optimal browser caching
MODERN TRIBE http://tri.be
87. Deploying Code
★ One click code deployment process
MODERN TRIBE http://tri.be
88. Deploying Code
★ One click code deployment process
★ QA, Staging, Production environments
MODERN TRIBE http://tri.be
89. Deploying Code
★ One click code deployment process
★ QA, Staging, Production environments
★ Default dev config for easy local install
MODERN TRIBE http://tri.be
90. Deploying Code
★ One click code deployment process
★ QA, Staging, Production environments
★ Default dev config for easy local install
★ Common local dev environments
MODERN TRIBE http://tri.be
91. Don’t Be A Stranger
Peter Chester
@peterchester
http://www.slideshare.net/peterchester/170-radio-stations-wordpress-at-scale
MODERN TRIBE http://tri.be