For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Sachin_M_258695's avatar
Sachin_M_258695
Icon for Nimbostratus rankNimbostratus
Aug 24, 2016

Need an Irule

What is an I rule for differentiating a traffic.

 

Requriment

 

If uri contains /xyz : it has to go to one of the member of the pool If URi contains /abc : It has to go to another member of the poolddd.d

 

Kindly provide an Irule Thanks Sachin M

 

5 Replies

  • You should really looking into creating a policy, assuming you have bigip 11.4 or better. Works a charm for our applications. Then you just create two pools and give them meaningful names. Will be much clearer to those that come behind you to support it.

     

    https://support.f5.com/kb/en-us/solutions/public/15000/000/sol15085.html

     

    Apply the policy to your virtual. Ideally you shouldnt apply a pool to your virtual b/c if that pool goes down it takes your virtual with it.

     

  • when HTTP_REQUEST {

    if { ([string tolower  [HTTP::uri]] starts_with "/xyz") } {
        pool abc
    } else {
        pool def
    

    }

    but I would recommend you to use a ltm policy for this ask

  • you can use LTM HTTP Policies to do that

     

    basically HTTP Policies are a GUI version of implemented easy HTTP parsing that a irule would do

     

  • *Hi Thanks for the reply

     

    I need a traffic to be flowed to same pool member not different.*

     

    I have two pool members with same content inside.

     

    thanks and Regards Sachin M

     

  • when HTTP_REQUEST {
    
    if { ([string tolower  [HTTP::uri]] starts_with "/xyz") } {
        pool mypool member 1.2.3.4
    } else {
        pool mypool member 1.2.3.4
    }