Connection pool
From Wikipedia, the free encyclopedia
In software engineering, a connection pool is a cache of database connections maintained by the database so that the connections can be reused when the database receives future requests for data. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and leads to wastage of resources. In connection pooling, after a connection is created, it is placed in the pool and it is used over again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database.
[edit] Applications
Connection pooling being normally used in web-based and enterprise applications is usually handled by an application server. Any dynamic web page can be coded to open a connection and close it normally but behind the scenes when a new connection is requested, one is returned from the connection pool maintained by the application server. Similarly, when a connection is closed it is actually returned to the connection pool. Connection pooling was first introduced in Microsoft Internet Information Server 3,[citation needed] the idea was soon after incorporated into other software vendors web server products.
Connection pooling is not limited to using application servers. Traditional applications that need frequent access to databases can benefit from connection pooling as well. This was traditionally handled by manually maintaining database connections, but as expected, that meant very well-crafted programming as the framework for pooling is highly complex. In recent years, things have become a lot easier due to availability third-party libraries that allow connection pooling as well as SQL statement pooling, thus giving high performance in database intensive applications.
Various parameters such as number of minimum connections, maximum connections and idle connections can be set to make sure the connection pool works well according to the environment it is deployed to work in.
[edit] External links
This article or section needs to be wikified to meet Wikipedia's quality standards. Please help improve this article with relevant internal links. (February 2008) |
- Article "Dive into connection pooling with J2EE" by Siva Visveswaran
- Article "Connection Pooling in Apache" by Nick Kew
- Article "Database Connection Pooling with Tomcat" by Kunal Jaggi
- Article "SQL Server Connection Pooling Myths" by Shawn Kresal
- Article "ADO.NET Connection Pooling at a Glance" by Neeraj Saluja
- Article "Connection Pooling with ASP" by Wayne Berry
- Article "Understanding Connection Pooling in .NET" by Joydip Kanjilal
- Article "Improved Performance with a Connection Pool" by Hans Bergsten
- JDBC connection pooling tips