Date post: | 12-Jan-2015 |
Category: |
Documents |
Upload: | mark-jaquith |
View: | 693 times |
Download: | 1 times |
Making WordPressGo “Vroom”
Mark Jaquith“JAKE-with”
Survey
MATH TIME50k pages/day = 0.58 pages/second
Uh... that’s it?
Traffic isn’t steady
Speed Ma"ers
Scaling a Single Server
Apache
nginx
proxy to Apacheor
PHP-FPM
PHPOpcode Cache
WP Object Cache
HTMLOutputCache
Batcache || W3 Total Cache || WP Super Cache
Nginx Microcache
Fragment Caching
if ( $html = get_transient( 'expensive-html-chunk' ) ) { echo $html;} else { $html = dynamically_generate_foo(); set_transient( 'expensive-html-chunk', $html, 3600 ); echo $html;}
TLC Transients
echo tlc_transient( 'example-feed' ) ->updates_with( 'my_callback' ) ->expires_in( 300 ) ->background_only() ->get();
MySQL Query Cache
CDN— with —
Origin Pull
Guideline:1000ms+ — Really slow
350–999ms — Slow250–349ms — Okay100–249ms — Fast
0–99ms — ZOMG FAST
The Optimization
Cycle
Dead-simple bo!leneck identification
<!--timer: <?php timer_stop(true) ?>-->
Nginxcaching
Proactivepurging
Result?
$ ab -c 350 -n 5000 http://havebabyneedstuff.com/
Result?Requests per second: 8114.53 [#/sec] (mean)
95% of requests served within 40ms99% of requests served within 82ms
Multiple Servers
Load Balancing
Sharing Uploads
Memcached
Rinse & Repeat
HyperDB