Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server: where is connection pool: on .net side or server side

In connection string to SQL Server there is max pool size option. My question is where is this connection pool managed and maintained - on .net side or on server side?

like image 219
ren Avatar asked Mar 29 '12 09:03

ren


2 Answers

Pool is maintained on the client side. So every client will create physical and logical connections. Physical connection is expensive to create, logical is not. User code directly works with logical connections using ***Connection (for example SqlConnection) classes. So when you dispose a connection you actually return a physical connection to a pool.

On the other side it is also possible to configure max allowed connections on the server side, thus server can make a crude load-balancing by denying some connections.

like image 185
oleksii Avatar answered Oct 21 '22 19:10

oleksii


The Pool is on the Client-side (.NET).

You're right that is not spelled out in many places but it clearly follows form the way it is configured and how it operates.

like image 35
Henk Holterman Avatar answered Oct 21 '22 19:10

Henk Holterman