Forum Discussion

Albert__Tase_70's avatar
Albert__Tase_70
Icon for Nimbostratus rankNimbostratus
Mar 19, 2008

ssl persistance and base on uri contents

Is there a way to use irule like this

 

when https request comes in to vip if the request contains x in the uri use ssl persit profile and use pool x

 

else use pool y

 

 

 

????

 

 

thanks

13 Replies

  • Hi Al,

     

    I am not sure I follow with you just stated? Let's recap so refocus on the issue.

     

     

    Your original request was

     

     

    "there a way to use irule like this

     

    when https request comes in to vip if the request contains x in the uri use ssl persit profile and use pool x

     

    else use pool y"

     

     

     

    The following is the iRULE that was created based on this.

     

     

    
    When HTTP_REQUEST {
        if { [HTTP::uri] contains "x" } {
             persist uie [SSL::sessionid] 1500
             pool poolx
        } { else { 
             pool pooly 
          }
        }
    }

     

     

    Of course you need to create the universal persistence profile

     

    1. Check Local Traffic, then then Profiles

     

    2. From the Persistence menu, select Create

     

    3. Type a name for the universal persistence profile

     

    4. From the Persistence menu, select Universal

     

    5. In the Configuration section, select the iRule check box, then select the persistence iRule you created.

     

    6. Click Finished

     

    You must now associate the universal persistence profile with the virtual server that is running the irule.

     

     

    The code above invokes the universal persistence profile only when the URI contains "x" and then sends the request towards Poolx. If it does not contain "x" it sends it to pooly w/o persistence.

     

     

    Where in this summary does it fail for you? Are you looking to do more then this?

     

     

    /CB

     

  • Hi,

     

     

    For information, when using such an iRule it's not mandatory anymore to use the persistence profile universal. you can assign straight this iRule to the VS.

     

     

    CB: it's [HTTP::uri] and not HTTP::uri in your iRule.

     

     

    HTH

     

     

  • I guess they should put that in the ask F5 website that it is no longer mandatory. You are the first tell me that it is not. I am soo glad this forum exists. ;-)