HTTP persistent connection

From Wikipedia, the free encyclopedia

Jump to: navigation, search

HTTP persistent connections, also called HTTP keep-alive, or HTTP connection reuse, is the idea of using the same TCP connection to send and receive multiple HTTP requests/responses, as opposed to opening a new connection for every single request/response pair.

[edit] Advantages

less CPU and memory usage (because fewer connections are open simultaneously) enables HTTP pipelining of requests and responses reduced network congestion (fewer TCP connections) reduced latency in subsequent requests (no handshaking) errors can be reported without the penalty of closing the TCP connection

According to RFC 2616 (page 47), 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.

[edit] Use in web browsers

Schema of multiple vs. persistent connection.

Netscape Navigator (since at least 4.05) and Internet Explorer (since at least 4.01) support persistent connections to Web servers and proxies.

Navigator doesn't close persistent connections using timeout. All idling persistent connections are queued. When there is a need to open new persistent connections while connecting to a different server, the idle connections are killed by the browser using some form of LRU algorithm.[1]

Internet Explorer opens typically 2 persistent connections to each server. Persistent connections time out after 60 seconds of inactivity.

Mozilla Firefox supports persistent connections. The number of simultaneous connections can be customized (per-server, per-proxy, total).

Opera supports persistent connections since 4.0[2]. The number of simultaneous connections can be customized (per-server, total).

[edit] External links


You are viewing a mobilized version of this site...
View original page here

How do you rate mobile version of this page?

Mobilized by Mowser Mowser