Re: HttpWebRequest and pipelining

From: cb (cb_at_discussions.microsoft.com)
Date: 03/25/05


Date: Fri, 25 Mar 2005 14:41:02 -0800


"cb" wrote:

> I'd like to verify the IIS behavior, with a really simple client, basically
> sending off 3 requests over a single connection in a nonsequential manner.
> like
>
> GET
> GET
> GET
> HTTP/1.1 200 OK
> HTTP/1.1 200 OK
> HTTP/1.1 200 OK
>
> The aspect of squeezing all 3 GETs into a singel TCP package is not that
> important to me, but the ability to send additional requests over the same
> connection, before the previous requests come back is. This is ultimately for
> an environment that has high latency.
>

OK,
found it. The framework is doing all this for you under the hood, and by
default pipelining is switched on. It's just that in most normal test
situations it doesn't use pipelining.

I first set
ServicePointManager.DefaultConnectionLimit = 1
to force my client to use the same persistent connection for all requests.
Then I just send of a number of asynchronous Webrequests for different pages
from the same server.

The ServicePoint takes care of all the packaging up of the requests. I don't
think there is much in the way you can influence it. If you tell it to use
pipelining (default) it will pipeline (even put multiple requests in the same
TCP package) if it thinks it is the right thing to do.

 



Relevant Pages

  • Re: Connecting Out of Process Servers via COM+
    ... connection, and in fact we can only use one connection because of the way ... years ago when I needed a number of clients to share a single serial ... it would create a Dispatcher-Object first and registers ... > This means, altough COM+ would allow parallel requests, the calls would be ...
    (microsoft.public.vb.com)
  • Re: output.c error in multithreaded program
    ... >>I find an access violation windows message and start the JIT debugger to ... > thread will block until the Sleep() expires, ... >>it a good enough approach to handle repeated requests. ... connection. ...
    (microsoft.public.vc.mfc)
  • Slow DNS requests?
    ... I think that the delay is in resolving the DNS requests. ... Guest machines connected via CAT5 to the BEFSR41 run fine. ... As soon as the host name is resolved, performance seems to improve dramatically for that connection. ... It offers one set of entries for "Name Servers" and a different set for "Domain Search". ...
    (comp.os.linux.networking)
  • Re: http pipelining
    ... Oops, sorry, you meant sending requests in parallel, right? ... down a single TCP connection, without waiting for the first response. ... Certainly urllib and urllib2 don't support pipelining. ...
    (comp.lang.python)
  • Re: Slow DNS requests?
    ... I think that the delay is in resolving the DNS requests. ... Guest machines connected via CAT5 to the BEFSR41 run fine. ... As soon as the host name is resolved, performance seems to improve dramatically for that connection. ... your DHCP server will tell your machine what name servers to use. ...
    (comp.os.linux.networking)