Adds a remote server name to a pool.
rp_pool_addserver is
not currently support by mutually-aware OpenSwitch servers.
You can also use OpenSwitch Manager to add servers to
a pool.
rp_pool_addserver pool_name, server [, rel_server, status, position]
Name of the pool to which the server is being added.
Name of the remote server being added to the pool.
Name of the server within the pool relative to the server being added.
The status of the server being added.
When status is NULL, the generic status of this server is used for all pools if it exists in the [SERVER] section of the OpenSwitch configuration file or the status can be retrieved using rp_server_status.
If the server does not exist in the [SERVER] section, OpenSwitch uses the status of the DEFAULT server in the [SERVER] section.
When status is not NULL, the value is used for the server’s effective status in this pool, regardless of the generic server status. The status value is used until you change it using rp_pool_server_status, or until the server is removed from this pool using rp_pool_remserver and re-added with status set to NULL. This is called a pool-specific server status, which facilitates pool-based failover, where individual pools fail over clients to the secondary Adaptive Server even though the primary Adaptive Server is still considered running in other pools.
Once you set a pool’s server status using rp_pool_addserver or rp_pool_server_status, always verify the status using rp_pool_server_status, not rp_server_status, because the effective pool-specific server status can be different from the generic server status.
Pool-specific server status and pool-based failover
are not supported by mutually-aware OpenSwitch servers.
Valid status values are:
Value |
Description |
---|---|
UP |
The server is immediately available for use. |
DOWN |
The server is unavailable, and is not considered for new client connections to OpenSwitch. |
LOCKED |
The server is available, but new incoming connections being actively connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to client applications to be “stuck” until the pool is unlocked. |
Valid values are:
Value |
Description |
---|---|
HEAD |
rel_server is ignored, and server is placed at the beginning of the list of servers in the pool |
TAIL |
rel_server is ignored, and server is placed at the end of the list of servers in the pool. This is the default position if no value is supplied for position. |
BEFORE |
server is added immediately before rel_server in the list of servers in the pool. |
AFTER |
server is added immediately after rel_server in the list of servers in the pool. |
Adds server SYB_SERV1 to the end of the list of servers associated with POOL_A with no pool-specific server status.
1> rp_pool_addserver "POOL_A", "SYB_SERV1" 2> go
Adds server SYB_SERV2 with a DOWN status to a position immediately before SYB_SERV1 in the list of servers associated with POOL_A.
1> rp_pool_addserver "POOL_A", "SYB_SERV2", "SYB_SERV1", DOWN, "BEFORE" 2> go
Adds server SYB_SERV3 with status UP as the first server in the list of servers associated with POOL_A.
1> rp_pool_addserver "POOL_A", "SYB_SERV3", NULL, UP, "HEAD" 2> go
Adds server SYB_SERV2 to a position immediately before SYB_SERV1 in the list of servers associated with POOL_A. The status of SYB_SERV2 is the status of the DEFAULT server.
1> rp_pool_addserver "POOL_A", "SYB_SERV2", "SYB_SERV1", NULL,"BEFORE" 2> go
Adds server “ase3” to a position immediately before the server “ase1” in the list of servers associated with pool POOL1.
1> rp_pool_addserver "POOL1", "ase3", "ase1", NULL, "BEFORE" 2> go
Returns:
rp_pool_addserver: Server ase3 added to pool POOL1 (return status = 0)
Afterward, the rp_pool_help command is issued to display the information below about POOL1, such as status and mode (chained or balanced).
1> rp_pool_help POOL12> go
Returns:
pool_name mode cache status block next_server ---------- -------- ---------- --------- ----------- -------------- POOL1 CHAINED 0 UP 0 ase3 (1 row affected) server_name ------------------------------- ase3 ase1 ase2 (3 rows affected) attribute value ------------ -------- (0 rows affected)(return status = 0)
When a connection is first established within a pool, it is routed to the first (in chained mode) or next (in balanced mode) available server, therefore, the order in which you define servers in the pool is important.
To display the current set of servers within a pool, enter:
rp_pool_help "pool_name"
At the time a server is added to a pool, OpenSwitch does not validate the name of the server in the interfaces file. Make sure that the server name is accurate.
The supplied pool name does not exist in OpenSwitch:
rp_pool_addserver: There is no such pool 'pool_name'.
You can create a new pool with rp_pool_create.
The server does not exist in the pool:
rp_pool_addserver: There is no such server as 'rel_server' in pool 'pool_name'.
You can add a server using rp_pool_addserver.
Registered procedure call succeeded:
rp_pool_addserver: Server 'server' added to pool 'pool_name'.
rp_pool_create, rp_pool_remattrib, rp_pool_server_status, rp_pool_remserver