Connection pooling with the IBM Data Server Provider for .NET
When a connection is first opened against a DB2 database, a connection pool is created. As connections are closed, they enter the pool, ready to be reused within the same process by other applications that need connections.
The IBM Data Server Provider for .NET uses a normalized set of connection string attributes for determining the connection pool. By using normalized attributes, the chances of an application reusing connections is increased.
The IBM Data Server Provider for .NET enables connection pooling by default.
Note: You can turn connection pooling off using the Pooling=false connection string keyword/value pair. However, if you turn off connection pooling COM+ applications will not work.
You can control the behavior of the connection pool by setting connection string keywords for the following:
- The minimum and maximum pool size (MinPoolSize and MaxPoolSize)
- The length of time a connection can be idle before it is returned to the pool (ConnectionLifetimeInPool)
When a connection is first opened, a connection pool is created based on matching criteria that associates the pool with the connection string in the connection. Each connection pool is associated with a distinct connection string. If the connection string is not an exact match to an existing pool when a new connection is opened, a new pool is created. Connections are pooled per process, per application domain, per connection string, and, when integrated security is used, per Windows identit
If a pooled connection is available, it returns it to the caller, otherwise it will add a new connection to the pool, up to the maximum pool size specified (100 is the default). When the application calls “close” on the connection, instead of closing the connection, the pooler returns it to the pooled set of active connections. Once the connection is returned to the pool, it is ready to be reused on the next “open” call.
1 connection per string - one pool created- default pool size 100 - l 20 nodes in server. if all connections are busy and opened and have got 100 parallel request and all query taking time executing the request and didn't put back any connection back to pool then it will have 100*20= 2000 connection opened. and if application has 5 individual connection ten 2000*5=10,000 conneciton.
Your Database boooooom.... what to do next ?
Connection time out - wait for new connection to be assigned to request.
Idle time - connection lies in pool to serve for new request
Connection time out - wait for new connection to be assigned to request.
Idle time - connection lies in pool to serve for new request
No comments:
Post a Comment