Forum Discussion

    • alyubarov_3971's avatar
      alyubarov_3971
      Icon for Nimbostratus rankNimbostratus
      Thanks, John. This sounds like procs could help, but is it available in v10.x? Sorry, I should have been more specific in my question - we are at 10.2.4? Switch to 11 probably won't happen until the next year with the h/w upgrade.
  • If I may add, procs would definitely be the way to go here. I might have also said that a sideband call might work, but that too requires v11. There still may be a way though, depending on how the main rule interacts with the VIPs, and at what (if any) event level it needs to fire. So lets say for example you have a main rule that gets triggered at HTTP_REQUEST, and your two almost identical iRules, which probably also trigger code at HTTP_REQUEST. You could add the main rule to each VIP and use a few conditions inside that iRule to determine when and what to run. For example:

     

    VIP iRule:

     

    when HTTP_REQUEST {
        ...doing something important here
    }  

    Main iRule:

     

    when HTTP_REQUEST priority 501 {
        switch [virtual] {
            "app1-vs" {
                 do something for app1
            }
            "app2-vs" {
                 do something for app2
            }
        }
    }

    In this way, you have a single main iRule that 1) gets triggered after your VIP-specific iRule, and 2) evaluates code based on the caller VIP.