cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Controlling the number of open connections with pipelining

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 6 May 2011 14:31:49 +0200 (CEST)

On Thu, 5 May 2011, Vladimir Grishchenko wrote:

> The specifics of our app is that we need to fetch content from a limited
> number of servers, but there may be many requests generated from a single
> client to a particular server that need to be serviced at the same time,
> which sounds like a perfect case for using HTTP pipelining.

Possibly. Pipelining does not make them get serviced *at the same time*, just
queued up on the same physical connection and thus reach the server with less
time in between the requests compared to doing them serially on the same
connection without pipelining.

Doing N parallell connections to the same server and doing requests on all of
them will undoubtably be much more like *at the same time*.

> At the same time we want to cap the number of connections from a client to a
> particular server to avoid overloading as the number of clients can be
> large.

Well, a middle-ground might be to cap the amount of simultaneous connections
to the same host to N. Pretty much the way browsers work.

> I was able to gather pipelining support is still work in progress

I wouldn't exactly call it work in progress. It is a feature that we have and
that some people use. It isn't widely used but then pipelining isn't even
widely used in browsers, so there are probably more quirks to find and iron
out before it gets completely solid...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-06