title: Node.js async parallel - what consequences are?
body: <p>There is code,</p>
  
  <pre><code>async.series(tasks, function (err) {
      return callback ({message: 'tasks execution error', error: err});
  });
  </code></pre>
  
  <p>where, <code>tasks</code> is array of functions, each of it peforms HTTP request (using <code>request</code> module) and calling MongoDB API to store the data (to MongoHQ instance).</p>
  
  <p>With my current input, (~200 task to execute), it takes </p>
  
  <pre><code>  [normal mode] collection cycle: 1356.843 sec. (22.61405 mins.)
  </code></pre>
  
  <p>But simply trying change from <code>series</code> to <code>parallel</code>, it gives magnificent benefit. The almost same amount of tasks run in <code>~30 secs</code> instead of <code>~23 mins</code>.</p>
  
  <p>But, knowing that nothing is for free, I'm trying to understand what the consequences of that change? Can I tell that number of open sockets will be much higher, more memory consumption, more hit to DB servers? </p>
  
  <p>Machine that I run the code is only 1GB of RAM Ubuntu, so I so that app hangs there one time, can it be caused by lacking of resources?</p>