What is database connection pool?

What does connection pool mean when it comes to 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 search:

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

Source : Wikipedia

Author: UzumakiArtanis, 2016-01-10

1 answers

When you need to perform any operation on a database it is first necessary to establish a connection with it, such a 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 stream of thousands of constant requests, and each of them will generate the opening and closing of a new connection to the database. give. A simple technique to avoid this constant" open-close "of connections is to keep a certain number of them always open (a "pool" of connections) and simply resuse them when necessary, in this way you reduce both the expenditure of machine resources and the response time of your application.

 8
Author: BrunoRB, 2016-01-15 10:29:42