Sunday, March 25, 2012

Connection Pooling Logic

We have our own home grown connection pooling method that is not too
resilient.
I want to know how you handle connections to a database i.e how may
connections do you open as your Web/App tier starts up to the database, what
is the max that you allow ?
Also in the event SQL Server is slow, how do you ensure that the Web/App
tier does not open more connections ?
We have been struggling with this today as our Web/App tier does not know
better when to back off or just open new connections if there is more load.
ThanksHi
You connection pool should open a new connection when there are no free
connections, therefore if the server is not responding well connections are
going to remain in use longer! If you define a maximum pool size this will
give you an upper limit rather than creating additional connections and
potentially exacerbating the problems. The application should handle the
error generated when new connections can not be created.
Alerting when the pool is at it's upper limit should inform you when the
system is having problems although other alerts on CPU/Memory used may be
triggered first.
John
"Hassan" wrote:
> We have our own home grown connection pooling method that is not too
> resilient.
> I want to know how you handle connections to a database i.e how may
> connections do you open as your Web/App tier starts up to the database, what
> is the max that you allow ?
> Also in the event SQL Server is slow, how do you ensure that the Web/App
> tier does not open more connections ?
> We have been struggling with this today as our Web/App tier does not know
> better when to back off or just open new connections if there is more load.
> Thanks
>
>

No comments:

Post a Comment