Forum Discussion

14 Replies

  • I would disagree with Vijay_E, in my option, using multiple, more concise iRules and using priority to control the order they are triggered is a much better option.

    smaller iRules are easier to manage, priority gives the control over what happens in what order

    # iRule 1
    when HTTP_REQUEST priority 10 {
        # triggered first
    }
     
    # iRule 2
    when HTTP_REQUEST priority 20 {
        # triggered second 
    }
     
     

    https://clouddocs.f5.com/api/irules/priority.html

  • In my opinion, if possible, try and keep it as a single iRule. Lot more easier to manage.

    • Lee_Sutcliffe's avatar
      Lee_Sutcliffe
      Icon for Nacreous rankNacreous

      Could you clarify what you mean by mixed load balancing?

       

      Priority only ensures rules are executed in the preferred order.

      • mrgilchen's avatar
        mrgilchen
        Icon for Altostratus rankAltostratus

        I run 2 scripts.

        Each script check LB to get the client IP match with a pool by subnet.

        So the 2 scripts are giving me the same results.

         

        I check for client IP.

        Script1:

        set strSelectedPool [class match -value [IP::client_addr] equals "MEM-Manager-Subnet-To-Pool-Pairs"]

        pool $strSelectedPool

        Scrip2:

        set strSelectedPool [class match -value [IP::client_addr] equals "ORG-Manager-Subnet-To-Pool-Pairs"]

        pool $strSelectedPool

         

        In that case when a request comes, it will mix the pools. and get the same result.

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    I'm with Lee on this one. Multiple iRules.

     

    In computers as in life, simple is best. It's more robust, easier to fix etc etc.