Forum Discussion

Jon_Charette_41's avatar
Jon_Charette_41
Icon for Nimbostratus rankNimbostratus
Feb 07, 2006

Detect max connection limit to pool hosts

Hi,

 

 

I'm looking to detect when all of a pool's member nodes have reached their connection limits and redirect the http request to a different "waiting room" pool. The waiting room servers contain some javascript pages which cause the page to reload the requested URL after 1 minute, in hopes that the pool won't be full and the user will reconnect correctly.

 

 

Things to take note of.

 

- The pool that the request gets sent to is not the default for the Virtual Server.

 

- The destination pool has 10 web servers in it. I only want redirections to occur when all 10 are full.

 

- I tried using the LB_FAILED event using the code below to detect this, but it didn't seem to work.

 

 

Below is an example of what I'm doing. I've cut out lots of other code that is part of this rule and focused on the parts that are most relevant. Thanks for any help you can give here.

 

 

when HTTP_REQUEST{

 

if { [ matchclass [HTTP::host] equals $::prod_adminserver_url ] } {

 

set http_custom_pool 1

 

set http_pool_name Production_AdminServer_Pool

 

}

 

 

if { $http_custom_pool == 1 } {

 

pool $http_pool_name

 

}

 

}

 

 

when LB_FAILED {

 

if { [ matchclass [HTTP::host] equals $::lb_failed_urls ] } {

 

pool Production_LBFailed_WaitingRoom

 

}

 

}

2 Replies

  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    LB::failed is the correct approach, but you can't simply set a different pool. You need to use LB::reselect. There are examples in the forum. Good luck!
  • Hi,

     

     

    Suggest to use the MaxConnection Setup of Pool and PriorityGroups. So Users get connected to your pool until maxConnections are reached. After that they get connected to the lower priority Pool which could be your WaitingRoom Pool.

     

     

    This should work. Take care, there is a known problem (SOL7127)

     

     

    Regards Juerg