• Like
WordPress Need For Speed
Upcoming SlideShare
Loading in...5
×

WordPress Need For Speed

  • 2,589 views
Uploaded on

WordPress Need for Speed presentation

WordPress Need for Speed presentation

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,589
On Slideshare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
27
Comments
0
Likes
4

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. WordPressNeed for SpeedOr How I Learned to StopWorrying and Love the TrafficLoad.
  • 2. Who Am I?Background StoryObjectivesOn Rendering SpeedOn Processing SpeedConclusion
  • 3. Pascal DeschenesTechnologist, Nu Echo Co-Founder@pdeschenhttp://about.me/pdeschen
  • 4. Background Story
  • 5. When yourblog melddown.
  • 6. ,, To one who waits, a moment seems a year.
  • 7. A 1-seconddelay in pageload timeequals 11%fewer pageviews. source: Aberdeen Group
  • 8. On Rendering Speed Elapse Time for a Page to Load Completely
  • 9. Play the Page Speed Game
  • 10. Tracking Speed with Google Analytics _gaq.push([_trackPageLoadTime]);
  • 11. A Web Page ina Browser islike a Jigsaw.
  • 12. On ImagesOptimize your image resolutionDo not rely on browser image scalingHave a (small) favicon
  • 13. On Scripts and StylesScripts to the BottomCSS to the TopCombine & MinifyLimit Inline CSS & JavaScript
  • 14. On RequestsMove Static Content AwayMinimize RequestsReduce DNS Look-UpLimit Cookies Size
  • 15. CDN Stands forContent DeliveryNetworknot Canada.
  • 16. On Processing Speed Elapse Time to Serve a Page
  • 17. All Web ServersArent Equalssiege -c 250 http://blog.foo.barab -q -n 2500 -c 250 http://blog.foo.bar
  • 18. How may I serve you?Add Expire HeadersCompress ContentMinimize RedirectWorkers are your Friends
  • 19. WordPress Caching Plugins source: tutorial9.net
  • 20. HTTP Accelerators: Proxy and Cache source: Varnish Software
  • 21. Rolling Your Own With nginx #compress gzip_buffers 32 8k; gzip on; gzip_types text/html application/javascript text/javascript text/css text/xml application/atom+xml application/xml; #caching related proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=staticfilecache:180m max_size=500m; proxy_temp_path /var/lib/nginx/proxy; proxy_connect_timeout 30; proxy_read_timeout 120; proxy_send_timeout 120; proxy_cache_key "$scheme://$host$request_uri";
  • 22. Rolling Your Own With nginx upstream wordpress { server 127.0.0.1:81 weight=1 fail_timeout=120s; } server { listen 80; server_name blog.foo.bar; proxy_cache_valid 200 20m; access_log /var/log/httpd/nginx-access.log combined; # for debugging, log cache hit or miss. log_format up_head [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_x_forwarded_for" "$upstream_cache_status"; access_log /var/log/nginx/blog.foo.bar-access.log up_head; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; #unless specified, activate the caching set $do_not_cache 0;
  • 23. Rolling Your Own With nginx location / { # If logged in, dont cache. if ($http_cookie ~* "comment_author_ | wordpress_(?!test_cookie) | wp-postpass_" ) { set $do_not_cache 1; } proxy_cache_key "$scheme://$host$request_uri $do_not_cache"; proxy_cache staticfilecache; proxy_pass http://wordpress; } location ~* wp-.*.php|wp-admin { proxy_pass http://wordpress; } location ~* .(jpg|png|gif|jpeg|css|js|mp3|swf|pdf)$ { proxy_cache_valid 200 120m; expires 864000; proxy_pass http://wordpress; proxy_cache staticfilecache; } location ~* /[^/]+/(feed|.xml)/? { proxy_cache_valid 200 45m; ... }
  • 24. Virtual WordPress Hosting server_name www.blog.bar; location / { proxy_pass http://wordpress/www.blog.bar; ... } server_name www.blog.foo; location / { proxy_pass http://wordpress/www.blog.foo; ... }
  • 25. Questions?blog.rassemblr.com/tag/wordcampmtl @pdeschen