Connection PoolingTo improve performance, and scalability, the Netscape Application Server features a pool to share database connections so that commonly used, existing connections are reused rather than reestablished each time. Connection pooling avoids the overhead of creating a new database connection for each request.
At runtime, when an application creates a new connection to a database, the application actually creates a virtual connection. The Netscape Application Server creates and manages the actual connection and links it with the application's virtual connection. When the application is not using the connection, the connection is marked as free in the pool. If a new request is made to the same database with the same permissions (perhaps in a different session or even a different application), Netscape Application Server can use an existing free connection rather than creating a new one. This is called connection sharing. If the freed connection remains unused after a specified time-out period, it is released by the application server. Typically, Web applications grant similar access permisions to users by group. For security, each group grants its users only the connection permissions they need. For example, administration users log in and use a database connection that has been configured for Administrator. Users who are not members of the Administrator group cannot reuse this connection resource even if it is free in the pool. However, if the restricted connection is not currently in use, NAS can close it and create a new unrestricted connection, thus optimizing use of the limited connection resources. This is called connection stealing. |