In order to test how many async request can be handled at the same time, I’ve created a sample console application that showers my web application with requests:
static void Main(string[] args)
{
const string url = "http://localhost/cip/AsyncPage.aspx";
ThreadStart del = delegate
{
Console.WriteLine("Starting request");
WebRequest request = WebRequest.Create(url);
request.GetResponse();
Console.WriteLine("Response ready");
};
for (int i = 0; i < 50; i++)
{
new Thread(del).Start();
}
Console.ReadLine();
}
AsyncPage.aspx is an Async=”true” page and contains a task that loops from 1 to 10, every iteration sleeps for 1 second and writes to response dummy data (so single request takes 10 seconds).
What I’ve noticed that responses are returned in a batch of 10. So after 10 seconds I get 10 responses, after next 10 seconds, I get next 10 responses. I’ve done similar testing with Fiddler and result was the same – 10 requests seem to use all …. ASP.NET resources?
I wonder which ASP.NET setting is responsible for this behaviour.
Local load testing on a consumer platform is not an option in this instance.
It’s not ASP.NET that has request limits, it’s IIS itself and it depends on which version of Windows you’re running. Essentially, you’re restricted to a maximum of 10 unless you’re on a Server platform.
If you really want to load test this, the best idea would be to run it on a real server, you can probably virtualise to get what you need, although you obviously wouldn’t get real-world results from a virtualised server.
Reference: http://technet.microsoft.com/en-us/library/cc268241.aspx