What is Database Connection Pool?

Asked

Viewed 1,943 times

10

What does pool of connections mean when it comes to the Database? What does this concept imply in practice? What is its usefulness and importance in everyday life? Below is a definition I found in my research:

In software engineering, a connection pool is a connection cache database maintained so that connections can be reused when future requests to the database are required

Source : Wikipedia

1 answer

8

When you need to perform any operation on a database you first need to establish a connection to it, such a connection is usually done using the protocol TCP/IP and it will always cost to be opened and then closed. These costs are particularly significant in WEB applications where you can have a stream of thousands of constant requests, and each of them will generate the opening and closing of a new connection to the database. A simple technique to avoid this constant "open-close" connections is to keep a certain number of them always open (a "pool" of connections) and simply resuse them when necessary, this way you decrease both the machine’s resource spend and your application’s response time.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.