title: How to determine how many requests are queued in Node.js?
body: <p>I see that Parse Server instances running on AWS EC2 show increasing response times. The longer an instance is in service, the longer the response time, even though the number of requests / instance stays the same.</p>
  
  <p>In <a href="http://www.cyrilchandelier.com/running-multiple-instances-of-parse-server-on-the-same-machine" rel="nofollow noreferrer">this</a> article it say:</p>
  
  <blockquote>
    <p>Imagine that a running instance of your server is only using 25/30% CPU before latency goes up. At that point, you have to deploy a new instance of the same server to maintain a low latency. Why? Because of the use of a single thread, incoming requests are quickly queued, especially if one the request takes time to build the response.</p>
  </blockquote>
  
  <p>From <a href="https://stackoverflow.com/a/25194257/1870795">this</a> answer I understand that the commands <code>process._getActiveHandles()</code> and <code>process._getActiveRequests()</code> can be used to inspect the queue.</p>
  
  <ul>
  <li>Where specifically in the output of these commands do I see how many requests are in the queue, so I can see whether a backlog is building up?</li>
  <li>How can I tell whether the queue is overflowing, would that be in the Node.js logs?</li>
  </ul>