Re: HttpWebRequest and pipelining
From: cb (cb_at_discussions.microsoft.com)
Date: 03/25/05
- Next message: Kevin Grigorenko: "Using reflection to get the class name from a virtual method in an abstract class"
- Previous message: smartwebagent: "Re: Who can wrap it up?"
- In reply to: cb: "Re: HttpWebRequest and pipelining"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Kevin Grigorenko: "Using reflection to get the class name from a virtual method in an abstract class"
- Previous message: smartwebagent: "Re: Who can wrap it up?"
- In reply to: cb: "Re: HttpWebRequest and pipelining"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|