ltm rule command pool
iRule(1) BIG-IP TMSH Manual iRule(1)
pool
Sets the pool or pool member regardless of monitor status.
SYNOPSIS
pool POOL_OBJ (member (IP_TUPLE | (IP_ADDR (PORT)?)))?
DESCRIPTION
Causes the system to load balance traffic to the specified pool or pool member . In case only pool member is
specified ,the system will load balance traffic to the specified pool member regardless of pool member monitor
status. Pool member status may be determined by the use of the LB::status command. Server failure to respond
may be caught in the LB_FAILED event. Failure to select a server because none are available may be caught in
the LB_FAILED event or prevented by using the active_members command to test the number of active servers in
the pool before sending traffic.)
Pool member may be selected conditionally. If multiple conditions match, the last match will determine the
pool/member to which this traffic is load balanced.
Syntax
pool
* Specifies the pool to which you want to send the traffic.
pool [member []]
* Specifies a pool member to which you want to directly send the
traffic.
RETURN VALUE
VALID DURING
CLIENT_ACCEPTED, CLIENT_DATA, CLIENT_LINE, CLIENTSSL_CLIENTCERT, CLIENTSSL_HANDSHAKE, DNS_REQUEST, GLOBAL_GTM,
HTTP_CLASS_SELECTED, HTTP_PROXY_REQUEST, HTTP_REQUEST, HTTP_REQUEST_DATA, LB_FAILED, NAME_RESOLVED,
RTSP_REQUEST, USER_REQUEST, USER_RESPONSE, XML_BEGIN_DOCUMENT, XML_BEGIN_ELEMENT, XML_CDATA, XML_END_DOCUMENT,
XML_END_ELEMENT, XML_EVENT
EXAMPLES
To select a pool conditionally:
when CLIENT_ACCEPTED {
if { [IP::addr [IP::client_addr] equals 10.10.10.10] } {
pool my_pool
}
}
To check pool member status before sending traffic:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with ".gif" } {
if { [LB::status pool my_Pool member 10.1.2.200 80] eq "down" } {
log "Server $ip $port down!"
pool fallback_Pool
} else {
pool my_Pool member 10.1.2.200 80
}
}
}
To catch failure of selected pool member to respond:
when HTTP_REQUEST {
if { [HTTP::uri] ends_with ".gif" } {
pool my_Pool member 10.1.2.200 80
}
}
when LB_FAILED {
pool my_Pool
LB::reselect
log "Selected server [LB::server] did not respond. Re-selecting node from myPool"
}
HINTS
In order to make this functionality work, one must precede the pool command with an LB::reselect command if a
pool member has already been selected.
For UDP, the load-balancing decision cannot be changed in the CLIENT_DATA event. This command will not have an
effect. Instead the CLIENT_ACCEPTED event is recommended.
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)