[erlang-questions] What is the difference between keep-alive and pipeline in intes http client
Thu Aug 11 16:33:50 CEST 2011
On Thu, Aug 11, 2011 at 4:39 AM, caox <caox@REDACTED> wrote:
> According to RFC2616, pipelining allows client to send multiple requests without waiting for each response. So I guess the difference between pipeline and normal keep alive is that the later should send request only after request on the connection has been responded.
> But the implementation of inets http client seems not same as my expectation. Both of pipeline and keep-alive send request directly without checking whether the earlier request has been responded.
> So I have missed something in the source code, or just misunderstood the RFC? What is the difference between keep-alive and pipeline?
Prior to HTTP 1.1 a client established a connection, sent its request,
got the response, and the connection was closed. Keep-alive allowed
the client to specify that it wanted to keep the connection open for
multiple request/response pairs. Under HTTP 1.1 keep-alive is
unnecessary since connections are persistent by default.
Pipelining allows a client to send a sequence of idempotent requests
and requires the server to send a sequence of responses in the same
order as the corresponding requests. It's a feature of HTTP 1.1.
Without pipelining you have a series of request/response pairs; with
pipelining you have a series of a sequence of idempotent requests,
each sequence paired with a sequence of corresponding responses to
More information about the erlang-questions