title: Why is node.js only processing six requests at a time?
body: <p>We have a node.js server which implements a REST API as a proxy to a central server which has a slightly different, and unfortunately asymmetric REST API.</p>
  
  <p>Our client, which runs in various browsers, asks the node server to get the tasks from the central server. The node server gets a list of all the task ids from the central one and returns them to the client. The client then makes two REST API calls per id through the proxy.</p>
  
  <p>As far as I can tell, this stuff is all done asynchronously. In the console log, it looks like this when I start the client:</p>
  
  <pre><code>Requested GET URL under /api/v1/tasks/*: /api/v1/tasks/
  </code></pre>
  
  <p>This takes a couple seconds to get the list from the central server. As soon as it gets the response, the server barfs this out very quickly:</p>
  
  <pre><code>Requested GET URL under /api/v1/tasks/id/:id :/api/v1/tasks/id/438
  Requested GET URL under /api/v1/workflow/id/:id :/api/v1/workflow/id/438
  Requested GET URL under /api/v1/tasks/id/:id :/api/v1/tasks/id/439
  Requested GET URL under /api/v1/workflow/id/:id :/api/v1/workflow/id/439
  Requested GET URL under /api/v1/tasks/id/:id :/api/v1/tasks/id/441
  Requested GET URL under /api/v1/workflow/id/:id :/api/v1/workflow/id/441
  </code></pre>
  
  <p>Then, each time a pair of these requests gets a result from the central server, another two lines is barfed out very quickly.</p>
  
  <p>So it seems our node.js server is only willing to have six requests out at a time.</p>