Databases Reference
In-Depth Information
for all users isn't an option for security reasons; therefore, you are using Kerberos
authentication to authenticate users using their operating system user name and
password. To reduce the number of connections that must be created and man-
aged, you can use reauthentication to switch the user associated with a connec-
tion to multiple users. For example, suppose your connection pool contains a
connection, Conn, which was established using the user ALLUSERS. You can
have that connection service multiple users—User A, B, C, and so on—by
switching the user associated with the connection Conn to User A, B, C, and so
on. Minimizing the number of connections conserves memory, which improves
performance.
Not all database drivers support reauthentication. For those drivers that do,
the user performing the switch must be granted specific database permissions.
In JDBC, reauthentication is implemented in both the driver and the
Connection Pool Manager. In ODBC and ADO.NET (if reauthentication is
implemented), it is implemented in the driver/provider.
Without reauthentication, the Connection Pool Manager or the driver/
provider maintains a different set of connections for each user logged on the
database with different user credentials because the resulting connection strings
are different. For example, depending on the implementation, one set of connec-
tions is maintained for User A and another set for User B, and still another set for
User C, and so on, in the same connection pool or in different pools. For the pur-
poses of this discussion, let's assume an ADO.NET implementation where the
provider maintains connections for each user in different pools. If each connec-
tion pool has a minimum pool size set to a value of 10, the provider needs to
maintain 10 connections for User A, another 10 connections for User B, and
another 10 connections for User C, as shown in Figure 8-3.
What if User B and User C don't require as many connections as User A on a
regular basis? You could reduce the minimum pool size of the connection pools
that User B and User C use to five connections, but the provider still has to main-
tain different sets of connections. What if you could minimize the number of
connections required and simplify your entire connection pooling environment?
Using reauthentication, any available connection in the pool can be assigned
to a user if the user has the appropriate database permissions—the user associ-
ated with the connection is switched to the new user. For example, if the connec-
tion pool has a minimum pool size set to 15, the pool manager or driver/provider
could maintain 15 connections that User A, User B, or User C can use, as shown
in Figure 8-4. The pool manager or driver/provider only has to maintain one
connection pool for all users, which reduces the number of total connections.
Search WWH ::




Custom Search