More Related Content Similar to TurboPress: The High Performance Guide to WordPress - Jeff Waugh - WordCamp Sydney 2012 (20) More from WordCamp Sydney (17) TurboPress: The High Performance Guide to WordPress - Jeff Waugh - WordCamp Sydney 20124. Browser sho velling
shovelling
Web Server
PHP
shovelling
WordPress
shovelling
MySQL
6. 1. DNS
“ bethesignal.org ”
Browser Router ISP DNS
“ 70 . 85 . 31 . 216 “
DNS Host
7. 1. DNS
“ bethesignal.org ”
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
DNS Host
8. 1. DNS
“ bethesignal.org ”
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
DNS Host
Google’s web performance
team calculate the average
DNS query takes 130ms!
9. 2. HTTP
“ bethesignal.org “
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
DNS Host
70 . 85 . 31 . 216 : 80
Web Ser ver
10. 2. HTTP
“ bethesignal.org “
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
220 ms
DNS Host
70 . 85 . 31 . 216 : 80
Web Ser ver
11. 3. PHP
“ bethesignal.org “
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
220 ms
DNS Host
70 . 85 . 31 . 216 : 80
Web Ser ver PHP
12. 3. PHP
“ bethesignal.org “
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
220 ms
DNS Host
70 . 85 . 31 . 216 : 80
650 ms
Web Ser ver PHP
13. 4. MySQL
“ bethesignal.org “
Browser 10 ms Router 160 ms
ISP DNS
“ 70 . 85 . 31 . 216 “ 210 ms
220 ms
DNS Host
70 . 85 . 31 . 216 : 80
Web Ser ver PHP MySQL
15. Browser sho velling
shovelling
Web Server
PHP
shovelling
WordPress
shovelling
MySQL
17. GET / HTTP/1.1
Host: bethesignal.org
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11
(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
Accept-Charset: UTF-8,*;q=0.5
Cookie: wordpress_logged_in_...=jdub...
If-Modified-Since: Thu, 12 Jul 2012 21:27:06 GMT
HTTP/1.1 200 OK
Server: nginx/1.2.1
Date: Fri, 20 Jul 2012 23:48:04 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Vary: Cookie
X-Pingback: http://bethesignal.org/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Fri, 20 Jul 2012 23:48:03 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Content-Encoding: gzip
18. 10:32:16.084565 * About to connect() to bethesignal.org port 80 (#0)
10:32:16.084768 * Trying 70.85.31.216... TCP_NODELAY set
10:32:16.283247 * connected
10:32:16.283376 * Connected to bethesignal.org (70.85.31.216) port 80 (#0)
10:32:16.283528 > GET / HTTP/1.1
10:32:16.283528 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/...
10:32:16.283528 > Host: bethesignal.org
10:32:16.283528 > Accept: */*
10:32:16.283528 > Accept-Encoding: deflate, gzip
10:32:16.283528 > Cookie: wordpress_logged_in_...=jdub...
10:32:16.283528 >
10:32:16.995103 < HTTP/1.1 200 OK
10:32:16.995216 < Server: nginx/1.2.1
10:32:16.995240 < Date: Sat, 21 Jul 2012 00:32:16 GMT
10:32:16.995295 < Content-Type: text/html; charset=UTF-8
10:32:16.995374 < Transfer-Encoding: chunked
10:32:16.995412 < Connection: keep-alive
10:32:16.995447 < Vary: Accept-Encoding
10:32:16.995482 < Vary: Cookie
10:32:16.995515 < X-Pingback: http://bethesignal.org/xmlrpc.php
10:32:16.995548 < Expires: Wed, 11 Jan 1984 05:00:00 GMT
10:32:16.995601 < Last-Modified: Sat, 21 Jul 2012 00:32:16 GMT
10:32:16.995642 < Cache-Control: no-cache, must-revalidate, max-age=0
10:32:16.995680 < Pragma: no-cache
10:32:16.995717 < Content-Encoding: gzip
10:32:16.995759 <
10:32:16.995794 { [data not shown]
10:32:17.393072 * Connection #0 to host bethesignal.org left intact
10:32:17.393170 * Closing connection #0
20. GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1
Host: bethesignal.org
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/536.11
(KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Referer: http://bethesignal.org/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-AU,en;q=0.8,en-US;q=0.6
Accept-Charset: UTF-8,*;q=0.5
Cookie: wordpress_logged_in_...=jdub...
HTTP/1.1 200 OK
Server: nginx/1.2.1
Date: Fri, 20 Jul 2012 23:50:50 GMT
Content-Type: image/jpeg
Content-Length: 180112
Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT
Connection: keep-alive
Expires: Wed, 19 Jul 2017 23:50:50 GMT
Cache-Control: max-age=157680000
Accept-Ranges: bytes
21. 10:34:05.051972 * About to connect() to bethesignal.org port 80 (#0)
10:34:05.052162 * Trying 70.85.31.216... TCP_NODELAY set
10:34:05.251898 * connected
10:34:05.251989 * Connected to bethesignal.org (70.85.31.216) port 80 (#0)
10:34:05.252123 > GET /wp-content/uploads/2011/04/strange-days.jpg HTTP/1.1
10:34:05.252123 > User-Agent: curl/7.21.4 (universal-apple-darwin11.0) libcurl/...
10:34:05.252123 > Host: bethesignal.org
10:34:05.252123 > Accept: */*
10:34:05.252123 > Accept-Encoding: deflate, gzip
10:34:05.252123 > Cookie: wordpress_logged_in_...=jdub...
10:34:05.252123 >
10:34:05.448816 < HTTP/1.1 200 OK
10:34:05.448981 < Server: nginx/1.2.1
10:34:05.449045 < Date: Sat, 21 Jul 2012 00:34:05 GMT
10:34:05.449091 < Content-Type: image/jpeg
10:34:05.449131 < Content-Length: 180112
10:34:05.449170 < Last-Modified: Fri, 08 Apr 2011 14:25:27 GMT
10:34:05.449211 < Connection: keep-alive
10:34:05.449250 < Expires: Thu, 20 Jul 2017 00:34:05 GMT
10:34:05.449290 < Cache-Control: max-age=157680000
10:34:05.449331 < Accept-Ranges: bytes
10:34:05.449382 <
10:34:05.449440 { [data not shown]
10:34:06.443613 * Connection #0 to host bethesignal.org left intact
10:34:06.443714 * Closing connection #0
26. Host DNS and web
services close to your
primary audience.
27. (This is one reason why
global web sites use CDNs,
particularly for static content.)
29. shovelling
Apache
mpm_prefork
sho velling
mod_php
shovelling
*.php ...
33. shovelling
Apache
mpm_prefork
sho velling
mod_php
shovelling
*.png ...
44. shovelling
nginx
php-fastcgi
sho velling
[worker]
shovelling
*.php ...
54. “There are only two hard things
in Computing Science: cache
invalidation and naming things.”
- Phil Karlton