Forum Discussion

Jason_Mahony_10's avatar
Jason_Mahony_10
Icon for Nimbostratus rankNimbostratus
Jan 25, 2005

Node failure redirect

Hi, I really not familiar with iRules but I could use a hand.

 

 

I'm running Big IP version 9.0.3. Essentially, I have a pool running HTTP and HTTPS on 2 servers. One of these servers should be running SIP as well. If the server running SIP goes down, I want the other server to start running SIP. So, what I need is an iRule that checks if a node/member is still running a particular service and if the node stops running this service, redirect the traffic from one pool to another.

 

 

Any help would be really appreciated.

10 Replies

  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Also, here's a basic rule for directing traffic to different pools based on the status of a pools members via the monitors:

     
     rule pool_check { 
        if { [active_members poolA] > 0 } { 
           pool poolA 
        } else { 
           pool poolB 
        } 
     } 
     

    The command active_members returns the number of members in the pool that are reported as UP. Note: If you don't have any monitors and the members are reported via the GUI or bigpipe as UNCHECKED, then active_members will return 0.

  • pool SIP_servers { 
     min active members 1 
     min up members enable 
     member 1.2.3.4:80 priority 1 
     member 6.7.8.9:80 priority 2 
     monitor all tcp 
     }

    According to the docs, priority group 2 would be active first, then group 1. Or is this another instance where the docs are wrong?
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    This is likely another case where the docs are wrong. Mullet and I checked the code and lower number's are used before higher numbers (eg, 1 is a higher priority than 2).
  • Hi,

     

    I'm not seeing that on our system. We have a web server pool at p 3 and then a down server at p 1 ... the down server should only get traffic if all the p 3 servers are down. Which seems to be the case. If what you say is true...what indication should we be seeing?

     

     

    Regards,

     

    Rick Mitterer

     

    NeimanMarcus.com

     

     

  • Hello All,

     

     

    You post the following rule :

     

     

    rule pool_check

     

    {if { [active_members poolA] > 0 }

     

    {pool poolA}

     

    else {pool poolB}}

     

     

    But it is possible to put a specific comamnd to automatically disable the PoolA when thi one goes down ?

     

     

    Best regards,

     

     

  • Hello,

     

     

    Sorry for my bad english :o) .

     

     

    My wishes:

     

     

    I have a vip and behind this vip I have 2 nodes

     

     

    NodeA (Master Node), priority 254

     

    NodeB (Backup Node), priority 128

     

     

    If nodeA goes down, I would like to disable this one with an Irule.

     

     

    Does it possible ?

     

     

    Best regards,

     

     

    Thanks

     

     

    Lucien
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    The good news is that yes, you'll be able to do that. The bad news is that you'll have to wait until the next release ships to get it.

     

    I believe I've previously posted a rule that uses an array to track the nodes and avoid using them if they've had several failures.

     

    Click here: http://devcentral.f5.com/default.aspx?tabid=28&view=topic&forumid=5&postid=3426
  • Hello UnRuleY,

     

     

    Thank you for your quick response.

     

     

    Do you have some documentations for the directive LB::reselect ?

     

     

    Do you have a date for this new release (9.2)

     

     

    Best regards,

     

     

    Lucien
  • Running 9.04

     

     

    With this setup I am getting priority 2 nodes when priority 1 nodes are up:

     

     

    pool www.domain.com {

     

    lb method member least conn

     

    min up members enable

     

    min active members 1

     

    monitor all health-check

     

    member 10.1.1.2:80 priority 1

     

    member 10.1.1.3:80 priority 1

     

    member 10.1.1.4:80 priority 1

     

    member 10.1.1.5:80 priority 1

     

    member 10.1.1.6:80 priority 2

     

    }

     

     

    Please advise