title: Connection pooling in node-mongodb-native, when to call db.open and db.close
body: <p>I've read most questions here about <a href="https://github.com/mongodb/node-mongodb-native" rel="noreferrer">node-mongodb-native</a> but I can't work out the standard practice as to when I should open/close a connection.</p>
  
  <p>Some sources say open/close as needed, some say use one db instance throughout. Does node-mongodb-native support automatic connection pooling? If so, how do I use this?</p>
  
  <p>I would really appreciate example code showing correct use of <code>db.open</code> and <code>db.close</code> in relation to, say, a login request.</p>