Creates a new pool.
You can also use OpenSwitch Manager to create pools.
rp_pool_create pool_name [, rel_pool, position, status, mode]
Name of the pool to be created.
Name of an existing pool, relative to which pool_name will be created.
Position of pool_name relative to rel_pool. Table 7-6 describes the values for position.
Position |
Description |
---|---|
HEAD |
rel_pool is ignored, and pool_name is placed at the beginning of the list of pools. |
TAIL |
rel_pool is ignored, and pool_name is placed at the end of the list of servers within the pool. This is the default position if position is not supplied. |
BEFORE |
pool_name is added immediately before rel_pool in the list of pools. |
AFTER |
pool_name is added immediately after rel_pool in the list of pools. |
The initial status of the pool. Table 7-7 describes the values for status.
Status |
Description |
---|---|
UP |
The pool is immediately available for use. |
DOWN |
The pool is unavailable, and will not be considered for use by any new client connections established to OpenSwitch. This is the default value. |
LOCKED |
The pool is available, but any new incoming connections actively being connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to the client applications to have stopped responding until the pool is unlocked. |
The routing and switching mode of the pool. Table 7-8 describes the values for mode.
Mode |
Description |
---|---|
CHAINED |
All connections are routed to the first server in the pool that has a status of UP or LOCKED. |
BALANCED |
Incoming connections are routed to servers in round-robin fashion among every server within the pool that has a status of UP or LOCKED, effectively balancing user load across all servers. |
Creates chained mode POOL_A at the end of the list of existing pools. This pool has a status of DOWN.
1> rp_pool_create "POOL_A" 2> go
Creates chained mode POOL_A immediately before POOL_B in the list of existing pools. This pool has a status of DOWN.
1> rp_pool_create "POOL_A", "POOL_B", "BEFORE" 2> go
Creates balanced mode POOL_A at the end of the list of existing pools. This pool has a status of LOCKED.
1> rp_pool_create "POOL_A", NULL, NULL, "LOCKED", "BALANCED" 2> go
Creates chained mode POOL_C at the end of the list of existing pools. This pool has a status of DOWN.
1> rp_pool_create "POOL_C", NULL, TAIL 2> go
Creates a chained mode POOL_D after POOL_B with status equal to UP.
1> rp_pool_create "POOL_D", POOL_B, AFTER, UP, CHAINED 2> go
The order in which pools are defined is important; all connections are routed to the first matching pool according to the attribute/value pairs established using rp_pool_addattrib. See rp_pool_addattrib.
Pools are initially created with no associated servers or attributes. Therefore, Sybase strongly recommends that you assign pools a status of DOWN. This prevents connections from being routed to the pool until its construction is complete.
Creating a new pool has no effect on existing connections. However, a new pool is considered when existing connections are being switched (for example, due to failover).
To specify a position of BEFORE or AFTER, you must also supply a relative pool.
The supplied pool name has already been created:
rp_pool_create: There is already a pool named 'pool_name'.
Either destroy or modify the existing pool.
The name of the relative pool supplied does not exist:
rp_pool_create: There is no such pool as 'rel_pool'.
A position of BEFORE or AFTER was specified without a corresponding relative pool:
rp_pool_create: NULL @rel_pool with 'position' position.
rp_pool_addserver, rp_pool_addattrib