title: Is there a limit to how many promises can or should run concurrently?
body: <p>Surprisingly google had trouble returning the result for this question.</p>
  
  <p>I'm wondering how many promises can or should be ran in parallel before queuing them and waiting for the next one to finish. I guess it might depend on the user's internet, but I figured it was worth asking.</p>
  
  <p>If it's based on the user's ISP/connection type is there a way to test for the ideal amount of promises to send before starting a queue?</p>
  
  <p>Also, I'm talking strictly from the client side. So, single thread js.</p>
  
  <p>Example code:</p>
  
  <pre><code>    function uploadToServer(requestData){
      return Promise((...));
     }
  
   function sendRequests(requestArray){
      var count = 0;
      for(var requestData in requestArray){
          if(count&lt;idealAmount){
              uploadToServer(idealAmount).then(count--);
              count++;
         }else{
             // Logic to wait before attempting to fire event
         }
  
     }
   }
  </code></pre>