I have a IIS app; during load testing of our app we found the throughput to be very low. While trying to fix the problem, we ran a test - load testing a page that returns some 1000 bytes of static data, with a sleep in the controller. What we find is that if the sleep duration is something like 1 second, IIS is unable to serve requests, within 1 second, at loads exceeding something like 10 rps.
Now I read about the Concurrent Requests and how post .Net 4.5, the default value is 5000. So if IIS is handling 5000 concurrent requests, how come it is unable to serve requests at 10 rps, with each request taking 1 second? Maths does not add up.
Notice that static data is returned, data size is small, and all the function doing is to sleep. So none of the machine params like CPU, disk, network etc go over limit. The server hardly blinks.
This is the entire controller code
public ActionResult Contact()
{
Thread.Sleep(1000);
return View();
}
The view in there returns some static HTML; I created the web app using Visual Studio template; the template returns static HTML.
When I remove the sleep, then I have no problem running the server at high rps. But then the requests complete so fast, that IIS would not even be encountering any high concurrency at even high rps.