Forum Discussion

JG's avatar
JG
Icon for Cumulonimbus rankCumulonimbus
Mar 12, 2014

The function of "LB::server pool"

The following function has been frequently recommended for use in the following situation:

if { [active_members [LB::server pool]] < 1 } {
     If there are no members available, generate HTML Maintenance Page
    HTTP::respond ...
}

The function explanation, on https://devcentral.f5.com/wiki/irules.LB__server.ashx, has the following:

LB::server pool

Returns the pool of the currently selected member. If no server was selected yet or all servers are down, returns default pool name.

Certainly the function is applicable when "all servers are down", but what is the situation of "yet"?

2 Replies

  • Probably if called from within an event where a load balancing determination hasn't been made yet.

     

  • the valid events are: CLIENT_ACCEPTED, HTTP_REQUEST, HTTP_RESPONSE, LB_FAILED, LB_SELECTED

     

    the order of evaluation from client to server is: CLIENT_ACCEPTED, HTTP_REQUEST, LB_SELECTED/LB_FAILED, HTTP_RESPONSE

     

    So the yet could be when you client hit the VS the first time.