Forum Discussion

yammy1688_99834's avatar
yammy1688_99834
Icon for Nimbostratus rankNimbostratus
Dec 22, 2011

limit # of pool members that will be taken out of service

Is there an elegant way to set the minimum of servers that MUST remain available in a given pool, regardless of what the monitors return?

 

 

I've set up an irule to forward traffic to an 'always-on' pool in the event of all pool members becoming unavailable, but it requires that all pool members being taken offline first.

 

 

 

Thanks,

 

 

 

-Ken

 

3 Replies

  • Hi Ken,

     

     

    There isn't any logic in default LTM config to stop marking pool members down if they fail the monitor checks. You could potentially build this into an external monitor script using a template:

     

     

    http://devcentral.f5.com/wiki/default.aspx/AdvDesignConfig/TemplateForExternalLtmMonitors.html

     

     

    If you want to get a count of the total members of a pool you can use the members command. To get a count of the active members you can use active_members:

     

     

    http://devcentral.f5.com/wiki/iRules.members.ashx

     

    http://devcentral.f5.com/wiki/iRules.active_members.ashx

     

     

    You could check the ratio of active members / total members to determine if you want to use a second pool.

     

     

    Aaron
  • Here's an untested example of the members ratio logic I was thinking of:

    
    when CLIENT_ACCEPTED {
    
     Check if there are less than half of the default pool members up
    if {[expr {double ([active_members [LB::server pool]]) / [members [LB::server pool]] < .50}]}{
    pool second_pool
    }
    }
    

    Aaron