Forum Discussion

Frank_Mancini_3's avatar
Frank_Mancini_3
Icon for Nimbostratus rankNimbostratus
Mar 30, 2007

iRule on one Virtual affecting another Virtual possible?

I want to detect if a pool is down in one virtual and activate something in another Virtual that has another pool. Is this possible?
  • There are a couple of options.

     

     

    1. use a global variable. By prefixing a variable with the global namespace "::" you can access it in any iRule on any virtual. WARNING, there is no garbage collection on these so they should be limited in the amount of info they contain - ie lists that grow are bad...).

     

     

    2. Use a User Statistics Profile. - you can create a statistics profile and apply it to a virtual. You can create name/value(int) pairs and read/write to/from them across iRules.

     

     

    The implementation really depends on what you need to do, but the global variables are great for boolean values for some sort of state. The downside with globals also is that they can be accessed and updated across all connections so you'll need to make sure that any connection specific data is not stored in a global variable.

     

     

    -Joe

     

  • Thanks for your reply. What i wanted to do was select another pool on VIP A, if VIP B is down. So basically, I need a rule that changes the pool one on VIP when another one is down.