Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Mark Jaquith                    Making                    WordPress      “JAKE-with” @markjaquith       Go “Vroom”mark@jaq...
Survey
MATH TIME 50k pages/day = 0.58 pages/second          Uh... that’s it?
Traffic isn’t  steady
SpeedMa ers
Scalinga Single Server
Apache
nginx
proxy to Apache      orPHP-FPM
PHPOpcodeCache
WPObjectCache
HTML            Output           CacheBatcache || W3 Total Cache   || WP Super Cache
NginxMicrocache
Fragment               Cachingif ( $html = get_transient( expensive-html-chunk ) ) {  echo $html;} else {  $html = dynamic...
TLC Transientsecho tlc_transient( example-feed )    ->updates_with( my_callback )    ->expires_in( 300 )    ->background_o...
MySQLQuery Cache
CDN   — with —Origin Pull
Guideline:1000ms+ — Really slow  350–999ms — Slow  250–349ms — Okay  100–249ms — Fast0–99ms — ZOMG FAST
TheOptimization   Cycle
Dead-simple bo leneck        identification<!--timer: <?php timer_stop(true) ?>-->
Case Studyhavebabyneedstuff.com
Nginxcaching
Proactive purging
Result?
$ ab -c 350 -n 5000 http://havebabyneedstuff.com/        Result?Requests per second: 8114.53 [#/sec] (mean)    95% of reque...
MultipleServers
LoadBalancing
SharingUploads
Memcached
Rinse &Repeat
HyperDB
Mark Jaquith      “JAKE-with”   Thanks! @markjaquithmark@jaquith.memarkjaquith.com
Upcoming SlideShare
Loading in …5
×

Scaling WordPress

1,702 views

Published on

Scaling WordPress

  1. 1. Mark Jaquith Making WordPress “JAKE-with” @markjaquith Go “Vroom”mark@jaquith.memarkjaquith.com
  2. 2. Survey
  3. 3. MATH TIME 50k pages/day = 0.58 pages/second Uh... that’s it?
  4. 4. Traffic isn’t steady
  5. 5. SpeedMa ers
  6. 6. Scalinga Single Server
  7. 7. Apache
  8. 8. nginx
  9. 9. proxy to Apache orPHP-FPM
  10. 10. PHPOpcodeCache
  11. 11. WPObjectCache
  12. 12. HTML Output CacheBatcache || W3 Total Cache || WP Super Cache
  13. 13. NginxMicrocache
  14. 14. Fragment Cachingif ( $html = get_transient( expensive-html-chunk ) ) { echo $html;} else { $html = dynamically_generate_foo(); set_transient( expensive-html-chunk, $html, 3600 ); echo $html;}
  15. 15. TLC Transientsecho tlc_transient( example-feed ) ->updates_with( my_callback ) ->expires_in( 300 ) ->background_only() ->get();
  16. 16. MySQLQuery Cache
  17. 17. CDN — with —Origin Pull
  18. 18. Guideline:1000ms+ — Really slow 350–999ms — Slow 250–349ms — Okay 100–249ms — Fast0–99ms — ZOMG FAST
  19. 19. TheOptimization Cycle
  20. 20. Dead-simple bo leneck identification<!--timer: <?php timer_stop(true) ?>-->
  21. 21. Case Studyhavebabyneedstuff.com
  22. 22. Nginxcaching
  23. 23. Proactive purging
  24. 24. Result?
  25. 25. $ ab -c 350 -n 5000 http://havebabyneedstuff.com/ Result?Requests per second: 8114.53 [#/sec] (mean) 95% of requests served within 40ms 99% of requests served within 82ms
  26. 26. MultipleServers
  27. 27. LoadBalancing
  28. 28. SharingUploads
  29. 29. Memcached
  30. 30. Rinse &Repeat
  31. 31. HyperDB
  32. 32. Mark Jaquith “JAKE-with” Thanks! @markjaquithmark@jaquith.memarkjaquith.com

×