Connecting pool Connection Pool

xiaoxiao2021-03-06  114

Connection pooling:

Frequency new and disconnect database connections, constantly consume system resources, affect overall performance, and newly built connections generally cost relatively long time. Workaround - Connection Pool

Purpose: Accelerate connection procedures and make full use of system resources

principle

1: When the program first requests a database connection, the data provider intercepts the request and creates a new connection assigned to the application.

2: Application is no longer required to send the release request request

3: Data Provider Intercept release connection request, and capture the request in the connection pool, but not actually abolish the connection, just plus free marks

4: Other applications request data connection again, data provider capture requests and get an idle connection from the connection pool to the application instead of a new connection. Only when all connections in the connecting pool are not idle is not idle, create a connection assigned to the application.

Generally, an instance of an application share a connection pool, but the new instance will use additional connection pools. From the perspective provided from the data, all instances of data access components are running in the same process, so all clients using the same data access component can share the same connection pool.

In the measure: SQL-Server, the upper limit of the connection pool of the Desktop version is

100.

Other related: Object pool Object Pooling (with minimum pool capacity and maximum pool capacity attribute, etc.)

Thread pool in .NET Thread pool ...

转载请注明原文地址:https://www.9cbs.com/read-103066.html

New Post(0)