Activate your free membership today | Log-in

Friday, March 21st, 2008

Roundup on Parallel Connections

Category: Browsers, Performance

<p>Steve Souders has taken a step back, analyzed the blog content that came out of IE 8 supporting 6 connections per host, and has pulled together the facts to discuss:

HTTP/1.1 RFC

Section 8.1.4 of the HTTP/1.1 RFC says a “single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.” The key here is the word “should.” Web clients don’t have to follow this guideline. IE8 isn’t the first to exceed this guideline. Opera and Safari hold that honor supporting 4 connections per server.

Settings for current browsers

Steve documents the browsers, and discusses how you can tweak the settings in your own: “It’s possible to reconfigure your browser to use different limits. Firefox these values are controlled by the network.http.max-persistent-connections-per-server and network.http.max-connections-per-server settings in about:config.”

Upperbound of open connections

This Max Connections test page contains 180 images split across 30 hostnames. That works out to 6 images per hostname. To determine the upperbound of open connections a browser supports I loaded this page and counted the number of simultaneous requests in a packet sniffer. Firefox 1.5 and 2.0 open a maximum of 24 connections (2 connections per hostname across 12 hostnames). This limit is imposed by Firefox’s network.http.max-connections setting which defaults to a value of 24.

In IE 6 , 7 & 8 I wasn’t able to determine the upperbound. At 2 connections per server, IE 6&7 opened 60 connections in parallel. At 6 connections per server, IE8 opened 180 connections in parallel.

Effect of proxies

Note that if you’re behind a proxy (at work, etc.) your download characteristics change. If web clients behind a proxy issued too many simulataneous requests an intelligent web server might interpret that as a DoS attack and block that IP address. Browser developers are aware of this issue and throttle back the number of open connections.

Will this break the Internet?

Much of the debate in the blog comments has been about how IE8’s increase in the number of connections per server might bring those web servers to their knees. I found the most insightful comments in Mozilla’s Bugzilla discussion about increasing Firefox’s number of connections. In comment #22 Boris Zbarsky lays out a good argument for why this increase will have no effect on most servers. But in comment #23 Mike Hommey points out that persistent connections are kept open for longer than the life of the page request. This last point scares me. As someone who has spent many hours configuring Apache to find the right number of child processes across banks of servers, I’m not sure what impact this will have.

Having said that, I’m please that IE8 has taken this step and I’d be even happier if Firefox followed suit. This change in the client will improve page load times from the user’s perspective. It does put the onus on backend developers to watch closely as IE8 adoption grows to see if it affects their capacity planning. But I’ve always believed that part of the responsibility and joy of being a developer is doing extra work on my side that can improve the experience for thousands or millions of users. This is another opportunity to do just that.

Related Content:

Posted by Dion Almaer at 10:10 am
1 Comment

+++--
3.6 rating from 5 votes

1 Comment »

Comments feed TrackBack URI

For most applications that don’t have millions of users, like internal business applications, the two connection limit usually just means the developer has to make three hosts pointing at the same IP so I for one welcome our new six connection overlords.

Comment by davejohnson — March 25, 2008

Leave a comment

You must be logged in to post a comment.