What is database connection pooling and why do web applications use it?
Correct! Well done.
Incorrect.
The correct answer is C) Maintaining a reusable set of open database connections so requests can borrow and return them instead of paying the cost of opening a new connection for every query, improving throughput under load
Correct Answer
Maintaining a reusable set of open database connections so requests can borrow and return them instead of paying the cost of opening a new connection for every query, improving throughput under load
Opening a new TCP connection and authenticating with the database for every request is expensive. Connection pools (PgBouncer, HikariCP, Laravel's persistent connections) keep a set of warm connections that requests borrow and return, reducing latency and preventing resource exhaustion under load.