title: HttpHandler low concurrent request processing
body: <p>I have a simple .NET 4.5 HttpHandler that does not seem to scale beyond 10 concurrent requests.  I'm expecting a much higher figure.  The handler does nothing more than sleep for a second and return a simple string.</p>
  
  <pre><code>concurrent requests   requests/minute
  1                     60
  8                     480
  9                     540
  10                    600
  11                    600
  12                    600
  15                    600
  32                    600
  512                   600
  </code></pre>
  
  <p>I've got a 64-bit Win7 machine with a 4-core i7 with 32GB of ram and an SSD, and the machine is idle during all the tests.  IIS is as configured out of the box.  I've also tried running this with an app pool created by IISTuner from Codeplex, but with no change in result.</p>
  
  <p>Changing IsReusable between true/false does nothing.</p>
  
  <p>I've added an entry to web.config to disable session state.  I'm using SoapUI for the testing, and have the close connections after each request flag set (and can see this reflected in the http headers).  Again, nothing seems to change.</p>
  
  <p>Amending the number of processes per app pool does raise the number, but still gives nowhere near the throughput I'm expecting (hundreds/thousands of concurrent requests).</p>
  
  <p>Here is the handler:</p>
  
  <pre><code>class TestHandler : IHttpHandler
  {
      public void ProcessRequest(HttpContext context)
      {
          Thread.Sleep(1000);
          context.Response.Write("I slept for 1s");
      }
  
      public bool IsReusable { get { return true; } }
  }
  </code></pre>
  
  <p>Here is the associated web.config file:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.5" /&gt;
      &lt;httpRuntime targetFramework="4.5" /&gt;
      &lt;sessionState mode="Off" timeout ="20" cookieless="false"&gt;&lt;/sessionState&gt;
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;handlers&gt;
        &lt;add name="Proposal01_Test" verb="*"
          path="*.test"
          type="Proposal01.TestHandler, Proposal01"
          resourceType="Unspecified" /&gt;
      &lt;/handlers&gt;
    &lt;/system.webServer&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>What am I missing?</p>