Connection Pooling

Acquiring a connection takes a short, but definite, amount of time. In a web application in which requests are handeled efficiently, connections can be opened and closed endlessly as new requests are processed. In this environement a small overhead required to establish a connection can become significant and limit the scalability of the system.

Connection pooling is the practice of keeping a permanent set of open data base connections to be shared by sessions that use the same data source. This avoids the needs to create and destroy connections all the time. Connection pooling in ADO.NET are completely transparent to the programmer, and your data access code dosen't need to be altered. When a client request a connection by calling Open(), it served directly from the available pool, rather than recreate it. When the client releases a connection by calling close() or dispose(), it is not discarded but returned to the pool to serve the next request.