What is connection pooling in Database?

9

What does connection pool mean for Database? What does this concept imply in practice? What is its usefulness and importance in everyday life? Here is a definition I found in my search:

  

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

Source: Wikipedia

    
asked by anonymous 10.01.2016 / 19:31

1 answer

6

When you need to perform any operation on a database it is first necessary to establish a connection with it, such connection is usually made using the protocol TCP / IP and it will always incur costs to be opened and then closed. These costs are particularly significant in WEB applications where you can have a flow of thousands of constant requests, and each one will generate the opening and closing of a new connection to the database. A simple technique for avoiding this constant "close-up" of connections is to keep a certain number of them always open (a "pool" of connections) and simply to reuse them when necessary, thereby reducing both the resource expenditure of the machine and the response time of your application.

    
11.01.2016 / 03:45