9/01/2007

Internet Explorer and Its HTTP Connection Limits

  Many web developers had discussed the IE client connection problem. Microsoft IE team blog had posted an related article titled: "Internet Explorer and Connection Limits" to explain their considerations behind this design. OpenAjax also has an article titled: HTTP connection limitation on AJAX to discuss this limitation's impact on Ajax applications.

  According to IE team's blog, the main reasoning behind is:
  "It turns out that this is a case where IE strictly follows the standards-- in this case, RFC2616, which covers HTTP1.1. As noted in the RFC:

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


  In order to improve the web application performance, you can do something at both the server and client side.

  For client side, you can change this limitation by edit the system registry:
  under the regkey "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", add/change the following two DWORD values:

  MaxConnectionsPerServer REG_DWORD (Default 2)
  Sets the number of simultaneous requests to a single HTTP 1.1 Server

  MaxConnectionsPer1_0Server REG_DWORD (Default 4)
  Sets the number of simultaneous requests to a single HTTP 1.0 Server

  In IE5 or later, it is also possible to change the connection limit programmatically by calling the InternetSetOption function on NULL handle with the following flags (note that it will change connection limit for the whole process):
INTERNET_OPTION_MAX_CONNS_PER_SERVER INTERNET_OPTION_MAX_CONNS_PER_1_0_SERVER.

  For server side, since IE treats hostname as server, not IP address, so a.yourname.com and b.yourname.com are different servers in IE's perspective. So you can use sub-domain to let user relief the 2 connection limits even if they are browsing your web site using IE.

  Here are some useful server side programming tips regarding the browser connection limits:
  1. Circumventing browser connection limits for fun and profit
  2. Improving web performance by distributing images among hostnames

  But for IE8, here are some good news for server side performance tuning developers:
  1. IE8: The Performance Implications
  2. Testing IE8’s Connection Parallelism
  3. Connectivity Enhancements in Internet Explorer 8
  4. Internet Explorer 8 and Maximum Concurrent Connections

No comments: