Forum Discussion

Jack_Rodriguez1's avatar
Jack_Rodriguez1
Icon for Nimbostratus rankNimbostratus
May 22, 2007

iRule that can disable node

I have a situation where I have two nodes in a pool and each is in a priority group. If the primary node fails, the traffic fails over fine to the node in the secondary priority group. The application owners would like to auto fail back to the primary node when it comes back online. Since the application works by creating a tcp session to the servers that stays nailed up, when the primary node comes back online, it only receives new sessions. The old session never gets torn down and causes problems in the database due to duplicate sessions. Is there an iRule that can insert some logic to monitor the status of the primary node and then mark the secondary node unavailable while the primary node is available. In a situation where the primary comes back online, the secondary node should be marked down and active sessions to that node should be terminated.

 

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    The only real way to do this via iRules would be to insert a check on every new connection to the VIP that checked the status of the primary node and acted accordingly. It sounds like this would be a task better suited to either iControl or a custom monitor that would monitor the primary node and take the secondary node down if it were up.

     

     

    If you don't mind the overhead, though, it could be done with an iRule using something like the LB::status command in the clientside context.

     

     

    Colin