I\'m using the node-mongodb-native driver with MongoDB to write a website.
I have some questions about how to manage connections:
Is it enough using
The primary committer to node-mongodb-native says:
You open do MongoClient.connect once when your app boots up and reuse the db object. It's not a singleton connection pool each .connect creates a new connection pool.
So, to answer your question directly, reuse the db object that results from MongoClient.connect(). This gives you pooling, and will provide a noticeable speed increase as compared with opening/closing connections on each db action.