rp_pool_create

Description

Creates a new pool.

NoteYou can also use OpenSwitch Manager to create pools.

Syntax

rp_pool_create pool_name [, rel_pool, position, status, mode]

Parameters

pool_name

Name of the pool to be created.

rel_pool

Name of an existing pool, relative to which pool_name will be created.

position

Position of pool_name relative to rel_pool. Table 7-6 describes the values for position.

Table 7-6: Position values for rp_pool_create

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.

status

The initial status of the pool. Table 7-7 describes the values for status.

Table 7-7: Status values for rp_pool_create

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.

mode

The routing and switching mode of the pool. Table 7-8 describes the values for mode.

Table 7-8: Mode values for rp_pool_create

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.

Examples

Example 1

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

Example 2

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

Example 3

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

Example 4

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

Example 5

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

Usage


Messages

See also

rp_pool_addserver, rp_pool_addattrib