Persistent Connection Behavior of Popular Browsers

Zhe Wang and Pei Cao
Department of Computer Sciences
University of Wisconsin, Madison
1210 West Dayton Street
Madison, WI 53706 USA
{zhe,cao}@cs.wisc.edu

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: 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.


Zhe Wang (zhe@cs.wisc.edu) and Pei Cao (cao@cs.wisc.edu)

Copyright Dec 9 1998