Connection Pool

See also Connection Pools under Designing and Developing an Application.


General

Log level

It is possible to set a different detail of logging for each connection pool. The server logger should be set to Info log level at least, in order to see connection pool logs.

Initialization mode
Manual

An administrator manually initializes the connection pool.

When first accessed

Web applications or sessions that connect to the connection pool on the first call.

Automatic

Automatically initializes the connection pool when the application is loaded.

Pool

Disconnect after usage

When the check box is selected, a connection will not be used again after it is returned to the pool. The termination path will be executed and then the connection will be disconnected. A new connection will be initialized if needed, according to the connection pool size definitions.

When the check box is not selected, the recycle path (it is recommended to define a recycle path when Disconnect after usage is not selected) is performed. The termination path will be executed once the connection pool stops. For more information see Defining a Termination Path.

User wait for connection timeout

The time, in milliseconds, that a user should wait to get a connection from the server before giving up. Leaving the box empty (or 0) sets no timeout at all.

Delay between connection attempts

The minimum delay time, in milliseconds, between any two consecutive connection creation attempts. Leaving the box empty (or 0) sets no delay at all.

Pool size type

Fixed: Constant number of connections (no pool size policy).

Limited: Number of connections is bound in a range.

Flexible: Number of connections is not bound by the pool.

Number of connections

When selecting Fixed as the size type, select the fixed number. When selecting Limited or Flexible enter the minimal and maximum number of connections in the pool as required.

Available connections

Not relevant when selecting Fixed as the size type. This field determines the pool size policy, see Pool Size Policy Considerations.

Minimal number of available connections in the pool. If the number of available connections in the pool falls below this number, new connections will be created until the minimum is reached.

Maximal number of available connections in the pool. If the number of available connections in the pool exceeds this number, some connections will be terminated until the maximum is reached.

Keep-alive

Path

A path that keeps the connection at the connection pool initial screen. Use the folder selection icon to select paths from different folders.

Interval

The time, in minutes, that an available connection may stay idle. When this time elapses, a keep-alive path is executed.

Connection information set

Select set

Select an existing Connection Information Set, or create a new one by selecting "<new set>" and pressing the button, labeled "New". To edit existing information set, select it in the combo box, and click the button (now labeled "Properties").

Delay after using a set

This delay takes place after a connection is terminated, and before a new connection can be initialized using the same parameter set. However, the delay will not occur if the connection information row has an unlimited repeat value (0). This feature is required for cases where the host can't initialize a new connection immediately after closing the current one, using the same parameters (user and password, device name, etc.).

Note:
Changes to the pool's parameters will take place immediately, though the pool may take a while to fully adjust to the new configuration. Furthermore, changes will not cause the sudden disconnection of current active users.

Pool Size Control Policy Considerations

A simple (but not recommended) size control policy would be to set the minimal and maximal number of available connections with the same value. Under such a policy, the pool will try to always have a fixed number of available connections at hand. Therefore, when a client receives a connection, the number of available connections is reduced by one. The pool will initialize a new connection. When the client returns a connection, the pool recycles it and then it has one extra available connection. The pool will then terminate one of its connections to maintain the fixed number of available connections.

As far as the host server is concerned, every user that used the connection pool requires a new connection and initialization process (besides the constant set of "buffered" connections). However (unless working with a disconnect after usage policy), other pool size policies can diminish the amount of work required from the host server for the same amount of users.

Let n be the minimal, and n+k the maximal numbers of available connections. Usually there will be n to n+k available connections at hand. When a client receives a connection, a new connection will only be created if there were exactly n available connections. Similarly, a connection will be terminated after a connection is returned to the pool only when there are already n+k available connections in the pool.

Let d be the maximal absolute difference between the number of connections taken from the pool and the number of connections returned to it during every moment in a given period. As long as d < k no new connections to the host server are required, no matter how many users are served during that time.

The chart provides an example of the possible effect of pool size policy. The blue line represents the number of users connected at any moment. The first pool is configured to have three available connections at any given time. The second pool has a range of available connections: two (minimum) to five (maximum). The size of the first pool (red line) varies exactly according to the activity of the users. It requires the host to initialize and logoff 19 additional connections while serving 40 users. The second pool is more stable in size (green line), and requires only five additional connections and destroys only three, serving the same amount of users.

graphics/poolsize.png

To conclude, we see that using a range of available connections (as opposed to holding a fixed size buffer) can dramatically reduce the number of connections and disconnections from the host server.

Note:
This is true only when using a recycle path instead of disconnect after usage policy.

Connection Information Sets may affect the actual maximum size of the pool. For example when a limited number of users and passwords with a repeat limit of one is defined in the connection information set, the maximum number of possible connections will be the number of users defined in the connection information set even if the defined pool size is flexible. Refer to Connection Information Set for further details.

Navigation

Initialization

A path that can be executed on any new connection to the host that navigates the connection to one of the Initial Screens.

Initial Screen

The initial screen is the first screen after the Initialization Path ends. The connection pool initial screen can be selected from the identified screens list. The Application Map can be used for this purpose.

Recycle

A path that can be executed on any used connection returned to the pool that navigates the connection to one of the Initial Screens.

Run recycle anyway

When checked, recycle path will always be performed after the connection has been used, even if the connection is in the initial screen.

Termination

A path that can be executed on any connection to the host (used or new) that should be performed before destroying a connection (for example, a host side logout procedure).

graphics/connectionpool.png