A lot of blogging and follow-up discussion ensued with the announcement that IE8 supports six connections per host. The blogs I saw:
- IE8: The Performance Implications
- IE8 speeds things up
- IE8: 6 Connections Per Host
- IE 8 and Performance
- Testing IE8.s Connection Parallelism
- IE 8 Connection Parallelism Issues
It’s likely that Firefox 3 will support 6 connections per server in an upcoming beta release, which means more discussion is expected. I wanted to pull all the facts into one place and make several points that I think are important and interesting. Specifically I talk about:
- the HTTP/1.1 RFC
- settings for current browsers
- upperbound of open connections (cool!)
- effect of proxies
- will this break the Internet?
The 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.
It’s important to understand that this is on a per server basis. Using multiple domain names, such as 1.mydomain.com, 2.mydomain.com, 3.mydomain.com, etc., allows a web developer to achieve a multiple of the per server connection limit. This works even if all the domain names are CNAMEs to the same IP address.
Settings for Current Browsers
The table below shows the number of connections per server supported by current browsers for HTTP/1.1 as well as HTTP/1.0.
| Browser | HTTP/1.1 | HTTP/1.0 |
| IE 8 | 6 | 6 |
| IE 6,7 | 2 | 4 |
| Firefox 3 | 6 | 6 |
| Firefox 1.5, 2 | 2 | 8 |
| Opera 9 | 4 | ?1 |
| Safari 3,4 | 4 | 4 |
1I don’t have the HTTP/1.0 stats for all browsers. If you know the stats submit a comment below and I’ll update the table. Use this parallel downloads test page.
I provide (some of) the settings for HTTP/1.0 in the table above because some of the blog discussions have confused the connections per server settings for HTTP/1.0 with those for HTTP/1.1. HTTP/1.0 does not have persistant connections so a higher number of connections per server is supported to achieve faster performance. For example, IE7 supports 4 connections per server in HTTP/1.0. In fact, AOL intentionally downgrades their responses to HTTP/1.0 to benefit from this increase in parallelization, although they do it at the cost of losing the benefits of persistent connections. They must have data that supports this decision, but I don’t recommend it.
It’s possible to reconfigure your browser to use different limits. How to configure Internet Explorer to have more than two download sessions describes how the MaxConnectionsPerServer and MaxConnectionsPer1_0Server settings in the Windows Registry control the number of connections per hostname for HTTP/1.1 and HTTP/1.0, respectively. In 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.
Note that IE8 automatically drops back to 2 connections per server for users on dialup connections. Also, web developers can detect the number of connections per server currently in effect by accessing window.maxConnectionsPerServer and window.maxConnectionsPer1_0Server in JavaScript. These are read-only values.
Upperbound of Open Connections
What’s the maximum number of connections a browser will open?
This is relevant as server adminstrators prepare for spikes from browsers with increased parallelization.
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. I’d have to create more domain names than the 30 I already have to try and find where IE maxes out. (If you load this in other browsers please post your results in a comment below and I’ll update this text.)
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.
In Firefox the network.http.max-persistent-connections-per-proxy setting has a default value of 4. If you try the Max Connections test page while behind a proxy it loads painfully slowly opening no more than 4 connections at a time to download 180 images. IE8 drops back to 2 connections per server when it’s behind a proxy, so loading the Max Connections test page shows an upperbound of 60 open connections. Keep this in mind if you’re comparing notes with others - if you’re at home and they’re at work you might be seeing different behavior because of a proxy in the middle.
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.
Patrick Meenan | 20-Mar-08 at 7:07 am | Permalink
FWIW, HTTP 1.0 CAN support persistent connections and the major browsers fully support it, just most servers didn’t. Using HTTP 1.0 with persistent connections allows AOL to get 4 parallel persistent connections out of browsers that would normally only establish 2.
You loose being able to use e-tags or other 1.1-specific headers but it works great for static objects from a CDN.
kl | 21-Mar-08 at 7:53 am | Permalink
Try lighttpd. It doesn’t seem to have problem even with crazy numbers of persistent connections.
Steve Souders | 21-Mar-08 at 8:30 am | Permalink
Anyone have data measuring load times for _real users_ downloading pages with several (8+) static resources on HTTP/1.0 vs. HTTP/1.1?
» IE8/FF3 Going To 6 Parallel Connections / Wayne Pan's Blog - tech | js | ui | ajax | life | mobile | 21-Mar-08 at 4:51 pm | Permalink
[...] do subdomain hacks, css sprites, etc to deal with this. I’m psyched.Steve Souders also has a good wrap up along trying to answer the question of will this break the internet? Posted by Wayne on Friday, [...]
soonvavoncize | 22-Mar-08 at 4:00 am | Permalink
Snx for you job!
It has very much helped me!
Mike Belshe | 23-Mar-08 at 9:53 pm | Permalink
Server architectures (e.g. Apache) which are thread-per-connection have a harder time scaling with large numbers of keepalives. Servers which use select/poll loops (e.g. Zeus) usually do not have this problem.
Zeus wrote a nice paper about the affect of KeepAlives on Apache in this paper: http://www.zeus.com/documents/en/ac/acceleration_apache.pdf
The paper is really about their proxy product, but ignore that; the analysis of how keepalives affect server performance is sound.
David Chapman | 06-Apr-08 at 10:01 pm | Permalink
Pseudo parallel feeds such as multiple ‘threads’ for XMLHttpRequest don’t help much unless being fed from different domains. Even then they depend on expanding excess serial capacity in the physical network link towards the client end.
There is but one serial physical network path into the client’s browser, even if you choose to multiplex that into multiple packet feeds, by whatever method.
The web in spite of broadband is still, and will always be a serial network; subject to the speed limit of the slowest link, often grinding down below dail-up speeds.
Add a heavy application, whether it’s an overweight AJAX library, Flash or Java, and you’re lost for a very long time between where you’ve been and where you might get. This gets very boring after about 10 seconds.
Users simply bail out altogether before about 20 seconds.
The only real solution is to make your web apps small. Then test them on dial-up bandwidth!
This isn’t going to change anytime soon. Serial links are not scalable; except by bandwidth improvement or improved compression by orders of magnitude. Although that’s happening, demand for bandwidth is still happening even quicker.
Many designers get lulled into a sense of false satisfaction with loading times because they work in a situation where they have got excess serial capacity connecting them to the net.
Go down to your local library or campus where several hundred PC’s share a link to the net and see if you’re still satisfied, and whether 2 or 4 or 6 or even 20 virtual connections make any difference!
When you’ve got past the great long boring wait, remember that most people see (or don’t see) your latest and greatest wonderful but overweight app that way.
tad | 28-Apr-08 at 12:43 pm | Permalink
You list max connections per server for opera 9 as 4 but there site says 8:
http://www.opera.com/support/usingopera/operaini/index.dml#performance
Is that 8 for http 1.0?
Steve Souders | 28-Apr-08 at 8:47 pm | Permalink
tad - I created a Cuzillion page to test this:
http://stevesouders.com/cuzillion/?c0=bi2hfff2_0&c1=bi2hfff2_0&c2=bi2hfff2_0&c3=bi2hfff2_0&c4=bi2hfff2_0&c5=bi2hfff2_0&c6=bi2hfff2_0&c7=bi2hfff2_0&c8=bi2hfff2_0
On Opera 9.27 using the default values (”Max Connections Server” is 8) downloads 4 resources in parallel for a single hostname. If you uncheck “Reduce Max Persistent HTTP Connections” it drops to 2 in parallel. If recheck that and raise “Max Connections Server” to 16 it downloads 8 in parallel. Perhaps this is a terminology gap but the default behavior is 4 in parallel.
assan37 | 30-Apr-08 at 10:07 am | Permalink
a , cheap tramadol, generic levitra, cialis on line, propecia, viagra cheap, zoloft, buy viagra now, buy tramadol, cheap prozac, purchase augmentin, cheapest viagra, buy rimonabant, order augmentin, cialis levitra viagra, purchase levitra, order prilosec,, prozac pills, purchase cheap levitra, soma, allegra, purchase tramadol,, buy antivert online, buy prednisone, nexium, viagra and levitra, buy prozac now,, cialis online,, buy pfizer viagra, cheap prednisone, generic soma, buying soma,, cheap soma, buy propecia, lasix, cheap cialis,, purchase soma, generic viagra, viagra online, propecia, buy prozac now, prozac pills, buying viagra online, lexapro, ultram er, cheap ultram, paxil, plavix, order viagra online, acomplia, generic cialis online, order ultram online, prednisone, zoloft, cheap ultram online, buy cheap acomplia online, buy soma online,, ultram 50mg, cheap cialis,, cheap zocor, purchase cheap tramadol,, ultram, cheap tramadol, order viagra, levitra, tramadol, buy viagra in usa, buy acomplia, buy prozac online, tramadol, cheap augmentin, levitra online, buy tramadol, viagra without a prescription,, buy rimonabant, cheap soma, buy cialis online, alternatives to viagra, viagra alternative, prozac, online tramadol, tramadol hcl, imitrex, cialis generic, buy online viagra, viagra tablets,