Configuring user pools

You have many choices for user connection handling through OpenSwitch; however, you must configure OpenSwitch to have one pool for application end users for use with the RCM. Sybase recommends that you also configure OpenSwitch to have one or more DSS user pools.

The RCM expects to find all application end users in one pool defined in the OpenSwitch configuration file. You can also define and configure one or more user pools for DSS users so that OpenSwitch connects all DSS users to the standby server, and so that the RCM ignores any connection errors they might generate. In a high-performance environment, offloading decision-support-system users to the standby Adaptive Server can minimize performance impact on the active server.

See “End-user connectivity” for more information about user pools.

See “DSS users” for more information about load balancing.


Application end users

When an application end user logs in, OpenSwitch sends the login request to the RCM. The RCM determines if the user can log in to the requested server based on the state of the replication environment.


DSS users

If DSS users log in after the environment has failed over to standby, the RCM either allows the DSS users to access the standby server or rejects them, depending on how you configure OpenSwitch and the RCM.

Other pools can be configured for DSS users. You have more flexibility when setting up this pool because DSS users have read-only access to the Adaptive Servers. The pool can be set to load-balance between servers or set to switch users if a server fails. At that time, all the connections on the failed server are redistributed to the next available server.

See “Setting configuration parameters for user pools” for more information.


Setting configuration parameters for user pools

Table 4-3 lists OpenSwitch parameters for user pools. These parameters are in the [CONFIG] section of the OpenSwitch configuration file.

Table 4-3: OpenSwitch user pool configuration parameters

Item

Description

To configure for application end user

To configure for DSS user

connections

An option for the POOL parameter that identifies the user connections used by that pool.

List the user connections that will use the pool defined by the POOL parameter.

You must list the connections using the following syntax:

attribute:regex [, regex]
[attribute:regex [, regex]...]]

where attribute is the name of a connection attribute, such as a user name, an application name, a host name, or a type of connection, and regex is a standard SQL-style extended regular expression that describes values for a given attribute. See Chapter 5, “Using the Configuration File” in the OpenSwitch Administration Guide for more information.

For example, if you set the attribute to “user name”, set the regular expression to one of the user names in that pool.

Same as for application end users.

MODE

An argument for the POOL parameter that defines the connection mode this user pool uses during failover.

Set to CHAINED. In CHAINED mode, all connections are routed to the first server within the pool. If the first server is not available, the OpenSwitch connects everyone to the next server in the list.

Set to CHAINED or BALANCED. In BALANCED mode, incoming connections are routed among all servers within the pool that have a status of UP.

See the OpenSwitch Administration Guide for more information.

POOL

The configuration parameter that defines the name of the user pool.

Set to match the RCM configuration parameter APP_POOL.

Set to any string valid for your environment, as long as it is unique.

SERVER

The configuration parameter that identifies the names of servers in the failover environment.

List the servers in the order they will be used by application end users.

List the active server first, followed by the standby server.

List the servers for the DSS users.

List the servers in the order they will be used by the DSS users if MODE is set to CHAINED.

STATUS

An argument for the POOL parameter that defines the status of each server in the pool.

Set to UP as the initial status.

The RCM controls the status of each server individually. The RCM monitors the connection and is aware of any failure. If a failure occurs, the RCM changes STATUS to DOWN.

NoteIf you do not set STATUS to UP, RCM does not work properly.

Set to UP as the initial status.

The RCM controls the status of each server individually.


User pool configuration file example

This section shows part of a sample OpenSwitch configuration file that contains a pool for application end users and one for DSS users. The application end-user pool is set up so that application end users connect to the active Adaptive Server first. If it fails, users are switched to the standby Adaptive Server.

The DSS pool is set up so that DSS users connect to the standby Adaptive Server first. If it fails, the users are switched to the active Adaptive Server.

[CONFIG]SERVER_NAME    =  ws_os
CHARSET        =  iso_1
.
.
.
COORD_USER     =  os_coord
COORD_PASSWORD =  os_coord_pwd
COORD_MODE     =  ALWAYS
.
.
.
[POOL=Application:MODE=CHAINED, STATUS=UP]
   servers:
      BookServer
      StandbyBook
   connections:
      username:bob
      username:fred

[POOL=DSS:MODE=CHAINED, STATUS=UP]
   servers:
      StandbyBook
      BookServer
   connections:
      username:alice