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?
Asked
Active
Viewed 1,641 times
8
2 Answers
5
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.

oleksii
- 35,458
- 16
- 93
- 163