Persistent Connection Behavior of Popular Browsers

Introduction

We study the HTTP/1.1 persistent connection usage of Netscape Navigator and
Internet Explorer using customized Web servers and proxies. We found that:

Both Navigator and Explorer support persistent connections to Web servers
and proxies. However,
neither supports request pipelining on a persistent connection.

Netscape Navigator opens multiple concurrent persistent connections to a
Web server to fetch embedded objects. The limit seems
to be 6 per Web server, though fewer connections are used
if there are fewer embedded objects.
The limit of 6 per server seems to be exceeded when the html page
consists of frames, or when multiple Navigator windows point to
the same Web server, in which case a maximum of 15 connections may be
used.

The maximum number
of outstanding persistent connections to different Web servers
seems to be 15.

Persistent connections are not timed out by Navigator. Rather, all
idling persistent connections seem to be put in a queue. When
the browser connects to a different Web server and needs to open
new persistent connections to the server, the idling connections are
killed by the browser using some form of LRU algorithm.

Internet Explorer opens typically 2 persistent connections to each
Web server. This is the case even when there are multiple
IE windows pointing at the same Web server.

Internet Explorer times out its persistent connections after 60 seconds.
When Explorer goes to a different Web server, the persistent connections to
the previous Web server are left around until they are timed out.

Both browsers reuse persistent connections to a Web proxy. That is,
if the browsers are configured to go through a proxy, then idle persistent
connections with the proxy are reused to send requests to different Web
servers.

It appears that browser clients do actively close persistent connections on
their own.

Experimental Setup

Browser side: We experiment with Netscape Navigator 4.05 on Solaris 2.6
on x86, and Internet Explorer 4.01.xx on Windows 95. Our experimental
method is "sitting in front of the browser and typing in various URLs".

Browser caches are turned off. In Navigator, we set memory and file cache
sizes to 0. In Internet Explorer, we start a new Web server on a different
port address from time to time to prevent cache hits during the experiments.

Web server: We use a custom Web server "httperf-server" that supports
persistent connection and request pipeline. The server never closes the
persistent connections with the clients, so that we can observe the clients'
behavior. In addition, the server can be suspended from time to time to test
the clients' reactions.
The Web server reports activities from the client.

Artificial Web page construction: We artificially construct Web pages
that are HTML pages with different number of embedded images. Our custom
Web server also returns real HTML pages from our home directory.

Web proxy: We also use a custom Web proxy to test the clients'
interaction with proxies. The proxy also supports persistent connection and
request pipelining, and does not close persistent connections with the clients.

Observations

Experiment 1: Persistent Connections

Both Netscape Navigator and Internet Explorer support persistent connections
to the proxy and to the server, but neither sends pipelined requests on a connection.

Our servers have been instrumented to record the number of requests serviced
on each persistent connection. We have seen the number as high as 35 in our
experiments. However, we also count the number of concurrent requests on
a connection and we have never seen the number bigger than 1.

Experiment 2: Client Timeout of Persistent Connections

We found that Netscape Navigator never times out a persistent connection to
a proxy or to a server. Rather, connections are closed when the maximum
number of live persistent connections is exceeded (see below).

Internet Explorer, on the other hand, closes a persistent connection if it
has been idle for 1 minute.

Experiment 3: Limit on the Number of Persistent Connections

We vary the number of embedded objects in our artificial Web pages and
test how many concurrent connections the browser will establish with our
custom server.

Internet Explorer:
We find that Internet Explorer typically establishs 2 persistent connections
to each Web server. Even if there are multiple IE windows fetching
HTML pages from the same server, there are usually only 2 persistent
connections to the server.

If the browser is switched to a different Web server, the persistent connections
to the previous server are kept around until they are timed out. As of now
we do not know whether IE has a hard limit on the total number of live
persistent connections to the Internet.

In our experiments we did encounter a bug (or feature) in IE. It seems to
forget to close some persistent connection at some point. The connection
was left idle for over 20 minutes. Unfortunately we were not able to repeat
the bug.

Netscape Navigator: We find that Netscape will use a maximum of 6
concurrent persistent connections to a Web server.
If there are fewer embedded objects, fewer connections are used.

However, if there are multiple Navigator windows to the same Web server,
or if there are multiple frames in the HTML page sent back by the Web server,
then up to 13 or 15 concurrent connections may be used.

The connections are kept around and never timed out. However, when the
browser switches to different Web servers and there is no proxy involved,
it uses a seemingly LRU algorithm
to close idle persistent connections. The total maximum number of
persistent
connections seems to be either 13 or 15.

We are not quite sure whether the hard limit is 13 or 15. It seems that the
number of persistent connections in its LRU queue is 13. However, we were
able to establish 15 connections once by launching three browser windows
pointing at three different different Web servers. After the two browser
windows tied up 12 persistent connections, the third one was only able to
issue 3 connections to its Web server, at which point, it hang!

Experiment 4: Persistent Connections with Proxies

If configured to go through a proxy, both Navigator and Explorer are aware of
the fact that the persistent connections are actually established with the
proxy, and reuse the connections when appropriate.
That is, when the browsers need to switch to different Web servers, and
a persistent connection with the proxy is idle, then that persistent connection
is reused.

If all connections with the proxy are busy, Netscape Navigator will establish
more persistent connections, subject to the 15-connection limit.
We do not understand clearly the behavior of Internet Explorer at this point.
Sometimes it adds more connections, sometimes it waits for the current
connections to become idle.

Summary

We found interesting browser behaviors on the use of persistent connections.
We encourage more experiments to learn more about how features of HTTP/1.1
are used in practice.