Pipelining

Pipelining involves a client sending multiple HTTP requests to a server without waiting for a response. Responses must then be returned from the server in the same sequence that the requests were received.

This topic summarizes pipelining. The HTTP/1.1 specification (RFC 2616) defines the rules about idempotency for HTTP requests. See The HTTP protocol for more information about the HTTP specifications.

The requester is responsible for ensuring that the requests are idempotent. Idempotency means that the same result is always obtained when all, or part, of the series of requests is repeated. Thus, if the connection to the server fails in some way, the client can retry the series of requests, without knowing if the server has implemented all, some, or none of the requests.

Most request methods are idempotent if they are used on their own, because the same result is obtained each time the method is used. (The exception is the POST method, because it changes the resource on the server.) However, when a sequence of requests is issued during pipelining, the sequence might be non-idempotent, particularly if resources are being changed.

If you plan to pipeline requests, check that the request sequence can be ended at any point, and restarted from the beginning, without causing a logical error. Otherwise, make the requests individually and await confirmation after each request.



dfhtl_httppipelining.html | Timestamp icon Last updated: Thursday, 27 June 2019