HTTP Connection Management

To really appreciate the advantages of binary data transfers and a persistent connection to the server, take a step back and consider how web browsers in traditional web applications connect to servers.

For years, web browsers would allow only two connections per domain. Because Flash Player uses the browser’s connection for running HTTP requests to the server, it shares the same limitations as all browser-based applications.

The latest versions of Internet Explorer (IE) and Mozilla Firefox increased the default number of simultaneous parallel HTTP requests per domain/window from two to six. It’s probably the biggest news in the AJAX world in the last three years. For the current crop of AJAX sites serving real WAN connections it means increasing the load speed and fewer timeouts/reliability issues. By the way, most of the Opera and Safari performance gains over IE and Firefox in the past are attributed to the fact that they allowed and used four connections, ignoring the recommendations of the W3C (which suggested allowing only two connections).

The fact that increasing the number of parallel connections increases network throughput is easy to understand. Today’s request/response approach for browser communications is very similar to the village bike concept. Imagine that there are only a couple of bikes that serve the entire village. People ride a bike and come back to give it to the next person in line. People wait for their turns, keeping their fingers ...

Get Agile Enterprise Application Development with Flex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.