I'm using sails.js with mongodb for my backend. And I've heard that connecting to database for each request can be really expensive, that's why other non-single threaded programming languages hold a connection pool for database right? So I wonder
- Does Nodejs utilize database connection pool?(I think I already have an answer which is NO, just to make sure)
- Since I'm using sails-mongo as mongodb driver, does it establish a new connection to mongodb each time I do some instructions to my mongodb? Or does it simply hold one connection and reuse it everytime?
- Assuming sails-mongo connects to the mongodb everytime and then disconnect when I'm done with it, what if the connection cannot be established? Will that jam the node thread, thus all later on requests could not be handled? I'm worried...