Velocity CFP now open!

Velocity 2010 is just around the corner!
Well, actually, it’s not until June 22-24, 2010. But Jesse and I have already been working with the O’Reilly conferences team for a few months. We have the venue – Hyatt Regency Santa Clara. We have the theme – Fast by Default. We have the cool blur motion speed image. The Program Committee signed on for another year: John Allspaw, Artur Bergman, Scott Ruthfield, Eric Schurman, and Mandi Walls. We’re already fielding calls from sponsors and exhibitors. The next step is speakers. That’s where you come in.
The Call for Participation for Velocity 2010 just opened today. We want to hear proposals for web performance and operations topics that you’re passionate to share. Some suggested areas include:
- Web frameworks with built-in performance
- Effective cloud computing
- Profiling web applications (esp. JavaScript)
- Network performance – HTTP, TCP, DNS
- NoSQL
- Mobile performance
- Evangelizing performance within your company
This is Velocity’s third year. The first two years were incredible. I’d love to see you at this year’s conference. If you’ve been working on something that other SpeedGeeks should hear about, submit a proposal now.
Fewer requests through resource packages
A few months back, I visited Alexander Limi at the Mozilla offices to discuss his proposal for resource packages. I liked the idea then and am excited that he has published the proposal in his article Making browsers faster: Resource Packages. I’ll start by reviewing the concept, provide my comments on some of the issues that have come up, and then provide some data on how this would impact the Alexa U.S. top 10 web sites in terms of HTTP requests.
Over the last few years I’ve talked with several people about the concept of bundling multiple resources into a single response, with the ultimate goal being to increase bandwidth utilization on the client. Typically, browsers only take advantage of about 30% of their bandwidth capacity when loading a web page because of the overhead of HTTP and TCP, and the various blocking behaviors in browsers. These previous resource bundling discussions got waylaid by implementation details and deployment challenges. The strength of Alexander’s proposal is its simplicity around these two tenets:
- the resource package is a zip file – Zip files have widespread support, are easy to create, require low CPU to zip and unzip, and are well understood by developers and users.
- the implementation is transparent to browsers that don’t support it – Developers can add resource packages to their existing pages with a LINK tag using the “resource-package” relationship. Browsers that don’t recognize “resource-package” LINKs (which is all browsers right now), ignore it and load the page the same way they do today. As browsers start to support “resource-package” LINKs, users start getting faster pages. Developers only have to create one version of their HTML.
These are simple principles, but they are why this proposal stands out.
How It Would Work
The first step is to identify which resources to bundle. There’s no simple recipe for doing this. It’s similar to figuring out which images to sprite, or which scripts to concatenate together. You have to look across your web pages and see if there is a core set of resources that are used over and over – rounded corners, logos, core JavaScript and CSS files, etc. You don’t want to bundle every image, script, and stylesheet across all your pages into one resource package. Similarly, you don’t want to create a separate resource package for every page – it’s wasteful to have the same resources repeated across multiple packages. Take the middle path.
The next step is to create a manifest.txt file that lists the resources, for example:
js/jquery.js
js/main.js
css/reset.css
css/grid.css
css/main.css
images/logo.gif
images/navbar.png
Then zip the manifest.txt and the files together.
Finally, add a line like this to your HTML document:
<link rel="resource-package" type="application/zip" href="pkg.zip" />
This causes the browser to download the zip file, extract the files, and cache them. As the browser continues parsing the HTML page, it encounters other resources, such as:
<script src="js/jquery.js" type="text/javascript"></script>
Browsers that don’t support resource packages would make a separate HTTP request for jquery.js. But browsers that support resource packages would already have jquery.js in cache, avoiding the need for any more HTTP requests. This is where the performance benefit is achieved.
Why? What about…?
To a large degree, bundling is possible today. Multiple scripts can be concatenated together. Similar story for stylesheets. Images can be sprited together. But even if you did all of this, you’d have three HTTP requests. Resource packages bundle all of these into one HTTP request. Also, although stylesheets are typically (hopefully) all in the document HEAD, you might have some scripts at the top of your HTML document and others at the bottom. You’d either have to bundle them all together at the top (and slow down your page for JavaScript that could have been loaded lower), or create two concatenated scripts. And even though I’ve created SpriteMe, creating sprites is still hard. Resource packages allow for files (scripts, stylesheets, images, etc.) to be developed and maintained separately, but more easily bundled for efficient download to the client.
Comments on various blogs and threads have raised concerns about resource packages hurting performance because they decrease parallel downloading. This should not be a concern. Worst case, developers could create two resource packages to get parallel downloading, but that won’t be necessary. I haven’t done the tests to prove it, but I believe downloading multiple resources across a single connection in streaming fashion will achieve greater bandwidth utilization than sharding resources across multiple domains for greater parallelization. Also, there will always be other resources that live outside the resource package. Jumping ahead a little bit, across the Alexa U.S. top 10 web sites, 37% of the resources in the page would not make sense to put into a resource package. So there will be plenty of opportunity for other downloads to happen in parallel.
Another advantage of zip files is that they can be unpacked as the bytes arrive. That’s where the manifest.txt comes in. By putting the manifest.txt first in the zip file, browsers can peel off the resources one-by-one and start acting on them immediately. But this means browsers are likely to block parsing the page until at least the manifest.txt has arrived (so that they know what to do when they encounter the next resource in the page). There are multiple reasons why this is not a concern.
- Some of the non-packaged resources could be placed above the resource package – presumably browsers would start those downloads before blocking for the resource package’s manifest.txt.
- The resource package’s LINK tag could (should) be included in the first part of the HTML document that is flushed early to the client, so the browser could start the request for the zip file even before the entire HTML document has arrived.
- A final idea that isn’t in the proposal – I’d like to consider adding the manifest to the HTML document. This would add page weight, but if manifest blocking was an issue developers could use this workaround.
- There should also be an ASYNC or DEFER attribute for resource packages that tells the browser not to wait. Again, only developers who felt this was an issue could choose this path.
My main issue with resource packages was giving up the granularity of setting caching headers for each resource individually. But as I thought about this, many web sites I look at version their resources today – giving them the same expiration dates. This was further confirmed during my examination of the top 10 sites (next section). If there are some resources that change frequently (less than weekly), they might be better in a separate resource package, or not packaged at all.
Survey of Resource Package Potential
I’m all about ideas that make a real impact. So I wanted to quantify how resource packages could be used in the real world. I examined the Alexa U.S. top 10 web sites and cataloged every resource that was downloaded. For each web site, I identified one or two domains that hosted the bulk of the resources. For the resources on those domains, I only included resources that had an expiration date at least one week in the future. Although you could package resources that weren’t cacheable, this would likely be a greater burden on the backend. It makes the most sense to package resources that are intended to be cached. The full details are available in this Google spreadsheet.
With this raw data in hand, I looked at the potential savings that could be achieved by using resource packages. On average, these websites have:
- 42 resources (separate HTTP requests)
- 26 of these would make sense to put into one or two resource packages
Using resource packages would drop the total number of HTTP requests on these sites from 42 to 17!
The results for each top 10 web site are shown in the following table. The last two columns show a size comparison. In the case of Amazon, for example, there were 73 HTTP requests for resources in the page. Of these, 47 were being downloaded from two main domains with a future expiration date, so could be put into a resource package. The download size of those 47 individual responses was 263K. After zipping them together, the size of the zip file was 232K.
original # of requests |
# of requests packaged |
individual file size |
zip file size |
|
Amazon | 73 | 47 | 263K | 232K |
Bing | 20 | 11 | 33K | 30K |
Blogger | 43 | 34 | 105K | 81K |
eBay | 48 | 38 | 179K | 159K |
43 | 43 | 303K | 260K | |
11 | 8 | 29K | 25K | |
MySpace | 41 | 10 | 39K | 35K |
Wikipedia | 61 | 21 | 73K | 63K |
Yahoo | 48 | 45 | 294K | 271K |
YouTube | 27 | 5 | 78K | 71K |
average | 42 | 26 | 140K | 123K |
This is a best case analysis. It’s possible some of these resources might be page-specific or short-lived, and thus not good candidates for packaging. Also, the zip file size does not include the manifest.txt file size, although this would be small.
Resource packages promise to greatly reduce the number of HTTP requests in web pages, producing pages that load faster. Once we have browsers that support this feature, the impact on page load times can be measured. I’m excited to hear from Alexander that Firefox 3.7 will support resource packages. I hope other browsers will comment on this proposal and support this performance feature.
SpeedGeeks LA videos now available
Quick follow-up on my blog post about SpeedGeeks LA, the performance meetup hosted at Shopzilla on Oct 26: Videos and slides from the presentations are now available:
- In Search of Speed – me (Google,slides, video)
- You Get What You Measure – Phil Dixon (Shopzilla,slides, video)
- A Holistic Approach to Building a High Performance Web Site – Paddy Hannon (Edmunds,slides, video)
- Latency Improvements for PicasaWeb – Gavin Doughtie (Google,slides, video)
- Performance-as-a-service – Morten Begai (Heroku,slides, video)
- MSFast – Jeremy Custenborder, Yadid Ramot (MySpace, download, video)
- Trace Down JavaScript & AJAX Performance in IE – Andreas Grabner (dynaTrace,slides, download, video)
- Application Architecture Determines Application Performance – Randy Stafford (Oracle,slides, video)
Definitely checkout the cool cars in Paddy’s slides.
SPeeDY – twice as fast as HTTP
Mike Belshe and Roberto Peon, both from Google, just published a post entitled A 2x Faster Web. The post talks about one of the most promising web performance initiatives in recent memory – an improvement of HTTP called SPDY (pronounced “SPeeDY”). The title of their blog post comes from the impact SPDY has on page load times:
The initial results are very encouraging: when we download the top 25 websites over simulated home network connections, we see a significant improvement in performance – pages loaded up to 55% faster.
SPDY is an application-layer protocol, as is HTTP. The team chose to work at this layer, rather than the transport-layer of TCP, because it’s easier to deploy and has more potential for performance gains. After all, it’s been 10 years since HTTP/1.1, the most common version in use today, was defined. The main enhancements included in SPDY are summed up in three bullets:
- Multiplexed requests – Multiple requests can be issued concurrently over a single SPDY connection.
- Prioritized requests – Clients can request certain resources to be delivered first, for example, stylesheets as a higher priority over images.
- Compressed headers – HTTP headers (User-Agent, cookies, etc.) represent a significant number of bytes and yet are not compressed, whereas in SPDY they are compressed.
The reason this is so exciting is because it’s an improvement to the Internet infrastructure. If SPDY is adopted by web browsers and servers, users will get a faster experience without requiring them or web developers to do any extra work. This is what I call “fast by default” and is the theme for Velocity 2010. We still need developers to build their web applications using performance best practices, but getting the basic building blocks of the Web to be as fast as possible is in a way easier to wrangle and has a wider reach.
The SPDY team has published a white paper and DRAFT protocol specification. I say “DRAFT” in all caps because this is a proposal. The team is actively looking for feedback. They’ve also released a SPDY-enabled version of Chrome, and will release an open-source web server that supports SPDY in the near future. Read the FAQ to find out more about how this relates to HTTP pipelining, TCP, SCTP, and more. (I’m not sure I buy their answer for how the name was chosen.)
This needs lots of review. Please take a look and send your feedback to the Chromium discussion group.
Update: Checkout follow-up articles from Mark Nottingham (Yahoo!, chair of the IETF HTTPBIS Working Group) and Alex Russell (Google, Dojo contributor, coined the term Comet).
Velocity OLC in December (discount #velfall09pcd)
The in-person Velocity conference is slated for June 22-24, 2010 in Santa Clara. But you don’t have to wait until then to whet your performance and operations appetite. On December 8 (less than 4 weeks from now!) the first Velocity Online Conference will be held.
Sessions include:
- How Web Speed Affects Online Business KPIs – Hooman Behesti (Strangeloop)
- Faster Load Times Through Deferred JavaScript Evaluation – Charles Jolley (Apple)
- Load Balancing & Reverse Proxies with Varnish & More – Artur Bergman (Wikia)
- CouchDB from 10,000 Feet – Chris Anderson (couch.io)
- A Roundtable Panel of Some of Your Favorite Velocity Web Ops Ninjas
The beauty of this format is anyone, anywhere can join in – all you need is a computer and an Internet connection. I’m especially excited to see the turnout from the international community (having just returned from Sweden, Amsterdam, and Berlin). The cost is $149. Use the velfall09pcd discount code for a 25% discount when you register.
I hope to hear you online December 8th. Here’s to a faster Internet!
Who’s not getting gzip?
The article Use compression to make the web faster from the Google Code Blog contains some interesting information on why modern browsers that support compression don’t get compressed responses in daily usage. The culprit?
anti-virus software, browser bugs, web proxies, and misconfigured web servers. The first three modify the web request so that the web server does not know that the browser can uncompress content. Specifically, they remove or mangle the Accept-Encoding header that is normally sent with every request.
This is hard to believe, but it’s true. Tony Gentilcore covers the full story in the chapter he wrote called “Going Beyond Gzipping” in my most recent book, including some strategies for correcting and working around the problem. (Check out Tony’s slides from Velocity 2009.) According to Tony:
a large web site in the United States should expect roughly 15% of visitors don’t indicate gzip compression support.
This blog post from Arvind Jain and Jason Glasgow contains additional information, including:
- Users suffering from this problem experience a Google Search page that is 25% slower – 1600ms for compressed content versus 2000ms for uncompressed.
- Google Search was able to force the content to be compressed (even though the browser didn’t request it), and improved page load times by 300ms.
- Internet Explorer 6 downgrades to HTTP/1.0 and drops the Accept-Encoding request header when behind a proxy. For Google Search, 36% of the search results sent without compression were for IE6.
Is there something about your browser, proxy, or anti-virus software that’s preventing you from getting compressed content and slowing you down 25%? Test it out by visiting the browser compression test page.
Security tests added to Browserscope
Today, the first new test suite for Browserscope was launched: Security.
Browserscope is an open source project for measuring browser capabilities. It’s a resource for users and developers to see which features are or are not supported by any particular browser. All of the data is crowdsourced, making the results more immediate, diverse, and representative. Browserscope launched in September (see my blog post) with tests for network performance, CSS selectors, rich text edit controls, and Acid3.
The new security tests in Browserscope were developed by Adam Barth from UC Berkeley, and Collin Jackson and Mustafa Acer from Carnegie Mellon University. It’s exciting to have these experts become Browserscope contributors. The tests cover such areas as postMessage API, JSON.parse API, httpOnly cookie attribute, and cross-origin capability leaks. See the Security about page to read about all the tests.
This is the point at which you can contribute. We don’t want your money – all we want is a little bit of your time to run the tests. Just click on the link and sit back. All that’s needed is a web client that supports JavaScript. We especially want people to connect using their mobile devices. If you have suggestions about the tests, contact us or submit a bug.
So far we’ve collected over 30,000 test results from 580 different browsers. Want to see how your browser compares? Just click on this button to add your browser’s results to Browserscope.
Firebug Net Panel: more accurate timing
There’s a lot of work that transpires before I can recommend a performance tool. I have to do a large amount of testing to verify the tool’s accuracy, and frequently (more often than not) that testing reveals inaccuracies.
Like many web developers, I love Firebug and have been using it since it first came out. Firebug’s Net Panel, thanks to Jan (“Honza”) Odvarko, has seen huge improvements over the last year or so: customized columns, avoiding confusion between real requests vs. cache reads, new (more colorful!) UI, and the recent support of export.
Until now, Net Panel suffered from an accuracy problem: because Net Panel reads network events in the same JavaScript thread as the main page, it’s possible for network events to be blocked resulting in inaccurate time measurements. Cuzillion is helpful here to create a test case. This example has an image that takes 1 second to download, followed by an inline script that takes 5 seconds to execute, and finally another 1 second image. Even though the first image is only 1 second, the “done” network event is blocked for 5 seconds while the inline script executes. In Firebug 1.4’s Net Panel, this image incorrectly appears to take 5 seconds to download, instead of just 1 second:
Honza has come through again, delivering a fix to this problem in Firebug 1.5 (currently in beta as firebug-1.5X.0b1 which requires Firefox 3.6 beta). The fix included help from the Firefox team to add the actual time to each network event. The results are clearly more accurate:
A few other nice features to point out: Firebug Net Panel is the only packet sniffer I’m aware of that displays the DOMContentLoaded and onload events (blue and red vertical line). Firebug 1.5 Net Panel has multiple columns available, and the ability to customize which columns you want to display:
With these new features and improved timing accuracy, Firebug Net Panel is a great choice for analyzing HTTP traffic in your web pages. If you’re not subscribed to Honza’s blog, I recommend you sign up. He’s always working on something new that’s helpful to web developers and especially to Firebug users.
Note 1: Remember, you need both Firefox 3.6 beta and firebug-1.5X.0b1 to see the new Net Panel.
Note 2: This is being sent from Malmö, Sweden where I’m attending Øredev.
SpeedGeeks LA at Shopzilla
I co-hosted a great web performance meetup yesterday called SpeedGeeks LA. The idea started when Phil Dixon invited me down to Shopzilla to give a talk. (Phil and I have stayed in touch after his amazing session at Velocity 2009.) Phil suggested we invite some other performance-minded companies in the area, and then we started talking about expanding it to include more speakers. We ended up with over 3 hours of presentations and nearly 150 people.
We had a great mix of talks (I hope to post all slides soon):
- In Search of Speed – I kicked it off talking about the importance of progressive enhancement as an enabler of progressive rendering. (slides)
- You Get What You Measure – A reprise of Phil’s talk from Velocity that includes the oft-cited stats about a 7-12% increase in revenue and 50% drop in server load thanks to faster performance.
- A Holistic Approach to Building a High Performance Web Site – Paddy Hannon (Edmunds) – A no-nonsense approach to instilling performance into the development process.
- Latency Improvements for PicasaWeb – Gavin Doughtie (Google) – Great tips from a web guru about what makes PicasaWeb fast.
- Performance-as-a-service – Morten Begai (Heroku) – Performance built-in to their Rails hosting environment.
- MSFast – Jeremy Custenborder, Yadid Ramot (MySpace) – Demo of MSFast plus a preview of what looks to be an awesome Flash profiler. Watch for it!
- Trace Down JavaScript & AJAX Performance in IE – Andreas Grabner (dynaTrace) – Check out their new dynaTrace Ajax Edition tool.
- Application Architecture Determines Application Performance – Randy Stafford (Oracle) – A reminder that sometimes you need to focus on backend performance, too.
Oracle was kind enough to sponsor lunch for everyone and raffle off a Wii. How awesome is that?!
A huge shoutout to Phil and the folks at Shopzilla, especially Lauren Moser. They hosted everyone at their headquarters and even handed out swag bags. The space was setup perfectly, with room for folks to group into smaller conversations during breaks. Just a top notch operation on all fronts.
I’m calling this the inaugural event for SpeedGeeks. My hope is that LA is just the first of many cities where SpeedGeeks gather to share knowledge about make the web faster. I’d like to see SpeedGeeks expand in a similar way as how Ignite events take place worldwide. If you’d like to pull together such an event in your city, contact me and we can brainstorm. I can rally performance gurus in the area and, who knows, I might even be able to drop-in and help co-host.
SpeedGeeks of the world unite!