title: How to check if mongos connection still alive in Node.JS?
body: <p>Let's imagine we have Node.JS app which is connecting to the Mongos process. But suddenly Mongos failed. How our app could now about it?</p>
  <pre><code>var db = null;  
  mongo.MongoClient.connect('mongodb://127.0.0.1:27017/test', function(err, mydb) {
      if(err) throw err;
      db = mydb
  });
  
  ..... on response we have .....
  db.collection('test_collection', function(err, collection){
      collection.find({}).toArray(function(err, documents){
          // doing some work here
          // but if Mongos failed, we are blocked on this stage
      }); 
  });
  </code></pre>