connection pooling in db(s)

connection pooling in db(s)

a very brief look at what is connection pooling.

·

1 min read

whenever you update some data in an application an database connection is created and then your data is updated in database, and then it is closed. on a small scale the steps involving opening and closing a connection are not that expensive. but as your application grows , the frequency at which the opening and closing happens becomes very expensive, ( especially when the database is remote ) which in return can impact the application’s performance.

here’s where the process of connection pooling comes into picture. what happens here, is that the pool manager(like c3po ) maintains a pool of open connections that can be reused by multiple clients.

pool manager checks if the pool contains any unused connection and returns one if available. If all the connections in the pool are active, then a new connection is created and added to the pool by the pool manager. Connection pooling reduces the number of times that new connections must be opened.

about me : shivam.ing