Firefox 3 beta 5: How many connections is too many?
Summary: I woke up this morning to an auto-update message from Firefox saying that beta 5 was available. Aside from some polish and a few bug fixes, beta 5 does have one big change over the last version: by default it will now keep three times as many connections to the server open at once.
I woke up this morning to an auto-update message from Firefox saying that beta 5 was available. Aside from some polish and a few bug fixes, beta 5 does have one big change over the last version: by default it will now keep three times as many connections to the server open at once. This change is somewhat controversial so let's look at it in a bit more depth.
When you open a web page that has many different objects on it, like images, Javascript files, frames, data feeds, and so forth, the browser tries to download several of them at once to get better performance. The effect is dramatic for the user, but hard on web servers.
Most HTTP servers and browsers use a protocol called "keep-alive" that doesn't close the connection when the client is done with it. This makes sense; opening a remote connection is expensive so it's much faster to open one and download 20 small items than to open and close a connection 20 times. Unfortunately the server can't tell exactly when the client is done, so all these connections are kept alive and consume resources on the server for some time.
In previous versions of Firefox, the maximum number of persistent (keep-alive) connection was set to 2. The number 2 is recommended by the HTTP 1.1 spec which says:
Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maintain to a given server. A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy. A proxy SHOULD use up to 2*N connections to another server or proxy, where N is the number of simultaneously active users. These guidelines are intended to improve HTTP response times and avoid congestion.
The spec was written in 1999 when high-speed internet connections were just (if you'll pardon the pun) a pipe dream for most users. Recently, many browsers have begin to bump the limits. Sylvian Pasche wrote a test (which you can run here) to find out the default settings for a number of major browsers. Here's what Sylvian found:
Firefox 2: 2 Firefox 3 beta 4: 2 Opera 9.26: 4 Opera 9.5 beta: 4 Safari 3.0.4 Mac/Windows: 4 IE 7: 2 IE 8: 6
A few hours after seeing that Firefox would have the smallest default value, Mozilla developers created a patch that increased the default to the same value used by IE8: 6 persistent connections. Robert Sayre says "in my totally unscientific tests, it rocks!"
In fact most of the network connection defaults have been increased in beta 5, compared to Firefox 2. You can see them by typing "about:config" in the URL field and searching for "connect":
network.http.max-connections = 30 (was 24) network.http.max-connections-per-server = 15 (was 8) network.http.max-persistent-connections-per-proxy = 8 (was 4) network.http.max-persistent-connections-per-server = 6 (was 2)
Of course these are the default values, which a savvy user can increase if desired. However almost everyone uses the default values.
George Ou recently warned of the effect of multiple connections on network congestion. Will these higher numbers make the problem even worse once they go into widespread use?
Related articles:
- Firefox 3 beta 5 will have improved connection parallelism
- IE8 speeds things up (FF3B5 uses the same tweak as IE8)
- Parallel connections test page (what does your browser use?)
- Browser performance comparisons (has good links to benchmarks)
Kick off your day with ZDNet's daily email newsletter. It's the freshest tech news and opinion, served hot. Get it.
Talkback
Justified - pages are much busier now!!
RE: Firefox 3 beta 5: How many connections is too many?
If the browser could actually tell the server how many objects there will be (although the server should have some clue), the server could then decide the right approach for the current demand upon it. Light load, give them everything now. High traffic, one thing at a time.
When such a conversation is unsupported by the browser and/or server, the current approach could be taken.
RE: Firefox 3 beta 5: How many connections is too many?
I currently have mine set at 16 and it runs great. But if you have it to high, the server gets congested and may cause error's or not load at all.
Also, This doesn't cause server's money. Just because a connection is left open for a bit, doesn't mean any data is being sent out of the server on that connection. So when no more data is being sent, no more bandwidth is being used. Thus no more money being lost.
Server's know to close a connection once there's no more activity on it for a bit.
Not a question of money
RE: Firefox 3 beta 5: many add-ons disabled
Patience
Honestly though, FF3b5 was just released on 4/3.. and you are already whining and complaining on 4/4 that a couple of addons aren't working with the newest **BETA** version of Firefox.
RE: Firefox 3 beta 5: How many connections is too many?
RE : How many connections is too many?
Henri
that's why!