Pooling of connections  
Author Message
Taras_96





PostPosted: 2008-4-23 14:49:00 Top

java-programmer, Pooling of connections Hi all,

I've read a few articles about how pooled connections are more
efficient because you don't need to repeatedly setup/teardown a
connection - you just acquire connection from the pool.

Exactly what steps in setting up/tearing down a connection are skipped
by acquiring an already existing connection? Perhaps the steps in
establishing/tearing down a connection would help in answering this
question?

Thanks

Taras
 
joeNOSPAM@BEA.com





PostPosted: 2008-4-23 22:41:00 Top

java-programmer >> Pooling of connections On Apr 22, 11:49 pm, Taras_96 <email***@***.com> wrote:
> Hi all,
>
> I've read a few articles about how pooled connections are more
> efficient because you don't need to repeatedly setup/teardown a
> connection - you just acquire connection from the pool.
>
> Exactly what steps in setting up/tearing down a connection are skipped
> by acquiring an already existing connection? Perhaps the steps in
> establishing/tearing down a connection would help in answering this
> question?
>
> Thanks
>
> Taras

The process of making a new connection is slow. It requires opening
a new socket from the client to the DBMS, which may require the DBMS
to spawn a new process, sending connection credentials, which the
DBMS must verify and respond to before any real work can be done.
A restaurant would be much less practical if it hired a waitress for
every new customer and terminated her when she finishes collecting
the bill.

Joe Weinstein at BEA Systems
 
Taras_96





PostPosted: 2008-4-24 12:09:00 Top

java-programmer >> Pooling of connections On Apr 23, 10:41 pm, "email***@***.com" <email***@***.com>
wrote:

>
> The process of making a new connection is slow. It requires opening
> a new socket from the client to the DBMS, which may require the DBMS
> to spawn a new process, sending connection credentials, which the
> DBMS must verify and respond to before any real work can be done.
> A restaurant would be much less practical if it hired a waitress for
> every new customer and terminated her when she finishes collecting
> the bill.
>
> Joe Weinstein at BEA Systems

So the cost saving is in the setup of a database connection, which
includes opening a communication path between the two components
(possibly using sockets), and authentication (although I guess that
whatever is trying to acquire the database connection would still have
to be authenticated)?
 
 
efriedNoSpam





PostPosted: 2008-4-24 12:19:00 Top

java-programmer >> Pooling of connections In article <email***@***.com>, Taras_96 <email***@***.com> wrote:
>On Apr 23, 10:41 pm, "email***@***.com" <email***@***.com>
>wrote:
>
>>
>> The process of making a new connection is slow. It requires opening
>> a new socket from the client to the DBMS, which may require the DBMS
>> to spawn a new process, sending connection credentials, which the
>> DBMS must verify and respond to before any real work can be done.
>> A restaurant would be much less practical if it hired a waitress for
>> every new customer and terminated her when she finishes collecting
>> the bill.
>>
>> Joe Weinstein at BEA Systems
>
>So the cost saving is in the setup of a database connection, which
>includes opening a communication path between the two components
>(possibly using sockets), and authentication (although I guess that
>whatever is trying to acquire the database connection would still have
>to be authenticated)?

That's pretty much it. Creating the connection involves all that, and is an
expensive operation. The connection pool manager acquires the connection and
is authenticated, not the consumer of the connection. That authentication is
only done once.

Eric