Here are some resources for optimizing web performance. The primary goal is improving user experience by speeding up page load times and interactive latency, but this often also results in reduced bandwidth and lower server load.
“SPDY (pronounced speedy) is an open networking protocol developed primarily at Google for transporting web content. SPDY is similar to HTTP, with particular goals of reducing web page load latency and improving web security. SPDY achieves reduced latency through compression, multiplexing, and prioritization.”
It is being used as the basis for the upcoming HTTP/2.0
- wikipedia SPDY page
Recent versions of Chrome/chromium, firefox, opera, and msie all support it. Details listed here
Debian RFP bug. Daniel Baumann took ownership of the bug in April 2012, but there hasn’t been any progress since then. It needs to be hijacked
SPDY/2 support introduced in 1.3.x dev branch.
SPDY/3.1 support added in 1.5.10 (Feb 4, 2014).
Module is ngx_http_spdy_module
So the 1.4.5-1 in jessie (and wheezy-backports) has SPDY/2.
1.5.10 isn’t currently in unstable yet (wishlist bug).
There is also QUIC ( Quick UDP Internet Connections ) and is an attempt to improve low level transport (and works with SPDY). But it’s pretty new and so isn’t very well supported yet.
Web servers and clients these days are CPU rich but bandwidth poor. By compressing highly compressible content (text files, html, etc) we can reduce bandwidth and also speed up page load times.
Optimization of content¶
By optimizing content, like reducing size, combining requests to reduce overhead, and other tricks we can reduce bandwidth, latency, and speed up page load times.
- Yahoo’s “Best Practices for Speeding Up Your Website” has some suggestions
- Google’s “Web Performance Best Practices” ) Tutorials and Pagespeed examples" have some suggestions
Dynamic optimization of content¶
Ideally we’d optimize our content to speed things up, but sometimes we don’t have that choice, we don’t control the code or don’t have time to make the changes, or we don’t want to change the human readable code for some reason. Then we can use tools to automatically do it for us.
Google has written mod_pagespeed, a module (for both apache and nginx) that dynamically optimizes content on the fly to reduce bandwidth and latency, improve page load times, etc.
- Debian ITP (not updated since March 2011)
- Debian ITP for ngx_pagespeed
- Apache 2.2 Caching guide, using mode_cache and mod_mem_cache or mod_disk_cache or mod_file_cache. Usually filesystem cache on Linux already gets you the best solution (since it spans processes, knows when things change, etc). There are a few cases (like proxing) where having apache cache helps, but it doesn’t make sense for most users.