Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the downsides of pipelining PUT and/or POST requests?

I've heard PUT and POST requests should not be pipelined. Why ?

like image 981
João Pinto Jerónimo Avatar asked Sep 05 '11 20:09

João Pinto Jerónimo


People also ask

What are pipelined requests?

Pipelining is the process to send successive requests, over the same persistent connection, without waiting for the answer. This avoids latency of the connection.

Is HTTP pipelining used?

Pipelining was added to HTTP/1.1 as a means of improving the performance of persistent connections in common cases. While it is deployed in some limited circumstances, it is not widely used by clients on the open Internet.

What is HTTP 1.1 pipelining how it works on a high level?

HTTP pipelining is a feature of HTTP/1.1 which allows multiple HTTP requests to be sent over a single TCP connection without waiting for the corresponding responses.

What is f5 pipeline?

"HTTP pipelining is a technique in which multiple HTTP requests are sent on a single TCP connection without waiting for the corresponding responses.[1]" "the server must send its responses in the same order that the requests were received" https://devcentral.f5.com/wiki/irules.http_response.ashx.


2 Answers

What this comes down to is Idempotence

Non-idempotent requests should not be pipelined, since the effects of N > 1 requests may produce a different result than a single request would do. This means the POST requests should not be pipelined, but any non-idempotent method (just about any request other than POST method) can safely be.

See:

  • RFC2616 section 9.1.2
  • Idempotence (Wikipedia)
  • HTTP pipelining (Wikipedia)
like image 198
DaveRandom Avatar answered Sep 23 '22 01:09

DaveRandom


I don't think that pipelining PUT requests poses much of an issue, but you should not pipeline POST requests. POST requests can alter the state of objects on the server. If a POST request is sent before the response to a previous POST request is received, the results may be indeterminate. This is especially true if the connection is terminated during the session.

like image 40
clarkb86 Avatar answered Sep 24 '22 01:09

clarkb86