Forum Discussion

razor85_180132's avatar
razor85_180132
Icon for Nimbostratus rankNimbostratus
Aug 10, 2017

LTM Policy and sorry pool

Hi, I want to migrate existing iRule to LTM Policy (simple URL - to - pool redirection). One nuance in this iRule is "sorry page" elseif structure:

 

when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/uri1"} { 
   pool pool-1
....
  } elseif {[string tolower [HTTP::uri]] starts_with "/urin"} { 
      pool  pool-n 
  } 
  SORRY PAGE
  elseif { [active_members pool-100] < 1 } {
          pool portal-sorry 
  } else {
          pool pool-100
}

Simple redirection is straithforward to rewrite to Policy. But here is my doubt: I cannot add to Policy logic responsible for sorry page. As I understand correctly iRule will override Policy pool assigment. Can we verify if LTM Policy result in match of any defined condition? If yes, bypass iRule code, if not - run "sorry page" code.

 

Best regards, Radoslaw

 

  • Hi Radoslaw, if I understood, you may set a variable into the ltm policy rule actions then, you will check it value on the iRule events, to know if you should continue to processing those events.

     

    Regards.