Forum Discussion

GaryZ_31658's avatar
GaryZ_31658
Historic F5 Account
Jan 19, 2005

Can we identify Server "UP" / "Down" Status in an iRule

I want to "Reap" connections to a server when another becomes "Active"

 

 

Scenario:

 

2 Servers in the Pool - Server1 Priority 10 Server2 Priority5 with Minimum Active Members set to 1.

 

 

If Server1 fails the health monitor, Server2 is sent all new connections.

 

 

The twist here is that when Server1 comes back online, BIG-IP should disconnect all existing connections to Server2 and force them to reconnect back to Server1.

 

 

This custom application uses a protocol that is "Telnet Like" so BIG-IP must force the TCP::close.

 

 

I know I can do this with an iRule but I'm not exactly certain how this could be written...

 

 

I was thinking something simple like a timer that watched for connections to Server2 and killed all connections after a specified time but it seems rather dirty.

 

 

I would rather have BIG-IP identify that the Priority 10 Server is back to "UP" Status before I send a TCP::close to the Priority 5 Server connections.

 

 

Can this be done in an iRule?

 

 

Thanks,

 

  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Gary,

     

    This would currently be a little cumbersome as a rule since we don't have a timer event (this capability is scheduled for release sometime in late spring/early summer). You would have to write the rule to route all the data through the CLIENT_DATA/SERVER_DATA events and constantly check the status of the desired pool member and/or a global variable; but, it could be done, though I'm not sure what the overall impact on performance would be.

     

     

    This kind of work should be coordinated through our professional services team.

     

     

    If I get the chance, I'll throw together an untested example that should give an idea of how to do something like this.

     

  • GaryZ_31658's avatar
    GaryZ_31658
    Historic F5 Account
    Thanks for the reply... We should be OK waiting until something official is released.

     

     

    I will be testing an alternative to this later in the week. What would make more sense is for me to create a "Node" level Monitor that does a "Reverse" check against Server1 and assign it to Server2.

     

     

    This way when Server1 goes "Down", Server2 comes "UP" and when Server1 comes back "UP" Server2 changes to status "Down".

     

     

    Once I can control this using Priority Activation, I can have the pool send a "Reset" on service down, solving my initial problem. (Eliminating the need for an iRule to send TCP::Close)

     

     

    My current issue is that Node Level Monitors are not recognized by the Pool. So Priority Activation cannot occur when monitors are set at the Node Level.

     

     

    There is speculation that I can get around this behavior and plan to validate this later in the week.

     

     

     

  • Coming back to this now. Do you have an example you can show us?

     

     

    /cb