user3156089
user3156089

Reputation: 17

Is one connection is enough in nodejs using mongoose driver for concurrent request in mongodb?

Is it possible to have one single connection poolsize { poolSize: 1 } for multiple and concurrent webservice hit in mongodb

Will it reuse the connection or will throw any exception

I'm Using mongoose driver in nodejs and mongoDB as database.

Upvotes: 0

Views: 171

Answers (1)

Munim
Munim

Reputation: 6520

It will reuse the connection, but it will slow down your database calls, as there is a limit of only one active connection to the database. This will cause issues when you scale up to higher loads.

Upvotes: 1

Related Questions