2010년 10월 25일 월요일

HTTP pipelining

HTTP pipelining

From Wikipedia, the free encyclopedia
HTTP
Persistence · Compression ·HTTP Secure
Header fields
ETag · Cookie · Referrer ·Location
Status codes
301 Moved permanently
302 Found
303 See Other
403 Forbidden
404 Not Found

HTTP pipelining is a technique in which multiple HTTP requests are written out to a single socket without waiting for the corresponding responses. Pipelining is only supported in HTTP/1.1, not in 1.0.

The pipelining of requests results in a dramatic improvement[citation needed] in page loading times, especially over high latencyconnections such as satellite Internet connections.

Since it is usually possible to fit several HTTP requests in the same TCP packet, HTTP pipelining allows fewer TCP packets to be sent over the network, reducing network load.

Non-idempotent methods like POST should not be pipelined. Sequences of GET and HEAD requests can be always pipelined. A sequence of other idempotent requests like GET, HEAD, PUT and DELETE can be pipelined or not depending on whether requests in the sequence depend on the effect of others.[1]

HTTP pipelining requires both the client and the server to support it. HTTP/1.1 conforming servers are required to support pipelining. This does not mean that servers are required to pipeline responses, but that they are required not to fail if a client chooses to pipeline requests.

Contents

[hide]

[edit]Implementation status

Schema of non-pipelined vs. pipelined connection.

[edit]Implementation in web servers

Implementing pipelining in web servers is a relatively simple matter of making sure that network buffers are not discarded between requests. For that reason, most modern web servers handle pipelining without any problem.

Exceptions include IIS 4.[citation needed]

[edit]Implementation in web browsers

HTTP pipelining is disabled in most browsers.[2]

Opera has pipelining enabled by default. It uses heuristics to control the level of pipelining employed depending on the connected server.[3]

Internet Explorer 8 does not pipeline requests, due to concerns regarding buggy proxies and head-of-line blocking.[4]

Mozilla browsers (such as Mozilla Firefox, SeaMonkey and Camino), support pipelining however it is disabled by default.[5][6] It uses some heuristics, especially to turn pipelining off for IIS servers. does the same thing as Firefox.

Konqueror 2.0 supports pipelining, but it's disabled by default.

Google Chrome does not support pipelining.[7] nglayoutinitialpaint.dela 0

[edit]Implementation in web proxies

Most HTTP proxies do not pipeline outgoing requests.[8]

Some versions of the Squid web proxy will pipeline up to two outgoing requests. This functionality has been disabled in the latest versions for "bandwidth management and access logging reasons."[9] Squid supports multiple requests from clients.

The Polipo proxy pipelines outgoing requests.[10]

[edit]Other implementations

The libwww library made by the World Wide Web Consortium, supports pipelining since version 5.1 released at 18 February 1997.[11]

Other application development libraries that support HTTP pipelining include:

  • Perl modules providing client support for HTTP pipelining are HTTP::Async and the LWPng (libwww-perl New Generation) library.[12]
  • Python module httplib2 provides http pipelining support.[13][14]
  • Apache Foundation project HttpComponents provides pipelining support in the HttpCore NIO extensions.
  • The Microsoft .Net Framework 3.5 supports HTTP pipelining in the module System.Net.HttpWebRequest.[15]
  • QT class QNetworkRequest, introduced in 4.4, supports HTTP Pipelining.[16]

Some other applications currently exploiting pipelining are:

Multipart XHR is implementation of pipelining (without any browser or web server support) done purely in Javascript in combination with server side scripting.[citation needed]

Testing tools which support HTTP pipelining include: