mongodb-starter icon indicating copy to clipboard operation
mongodb-starter copied to clipboard

question about mongodb connection handling

Open m-sallam opened this issue 2 years ago • 8 comments

from looking at the history of the mongodb connection handling code, it started out with pretty much the code from the with-mongodb example however it eventually ended up with caching the connection in global in both dev and production (even though there is a comment in the example about not using the global for production, which i don't understand why tbh).

is there a reason for that / an issue that made you switch the way of handling the connection?

also could you share the peak number of opened database connections you had and if possible what was the traffic like then? as i am wondering how the number of connections scales with traffic

m-sallam avatar Jun 14 '22 19:06 m-sallam