Courses / Node.js
47. Using connection pooling
Configure and use database connection pools to manage concurrent access efficiently.
JavaScript
Using connection pooling
A connection pool keeps a limited set of ready database connections that your app borrows and returns so many users can run queries efficiently.
"I don't want to open and close a new DB connection for every request — it's slow and crashes under load."
A connection pool pre-creates and reuses a small number of database connections, handing them to code that needs to run queries and reclaiming them afterwards to limit overhead and resource exhaustion.
"I don't want to open and close a new DB connection for every request — it's slow and crashes under load."
A connection pool pre-creates and reuses a small number of database connections, handing them to code that needs to run queries and reclaiming them afterwards to limit overhead and resource exhaustion.