Forum Discussion

leventogut_5438's avatar
leventogut_5438
Icon for Nimbostratus rankNimbostratus
Aug 20, 2007

clone pool feature called from iRule

Hi all,

 

 

 

We have an Big IP and I am trying to use the clone pool feature from the iRule.

 

My aim is to clone the client side flow and then remove the cookie and send to the pool.

 

 

But when I code this the clone'ing clones the server side flow rather than client which I actually need the client side.

 

 

I know there is a virtual server setting that does the client side cloneing but I would like to selectively clone i.e. some of the content will not be cloned but certain flows will be cloned.

 

 

Any ideas ?

 

 

Thanks in advance

 

 

Levent

 

 

Sample code:

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] starts_with "/clone_me" } {

 

clone pool clone_pool

 

HTTP::cookie remove $::cookie

 

pool real_pool

 

} else {

 

pool real_pool

 

}

 

}

2 Replies

  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Have you tried using the clientside command yet? - Click here

    It would look something like:

    
    when HTTP_REQUEST {
      if { [HTTP::uri] starts_with "/clone_me" } {
        clientside {clone pool clone_pool}
        HTTP::cookie remove $::cookie
        pool real_pool
      } else {
        pool real_pool
      }
    }

    The command is designed to make the iRule command in question fire in the clientside context. I haven't personally tested it with the clone pool command, but that's what it's there for, so I'd give that a shot first.

    HTH,

    Colin

  • Thanks for the suggestion Colin.

     

     

    I work with Levent, and have just tried the clientside option, and it unfortunately doesn't seem to help... The modified packet is still sent to both pools. Presumably this means our processing is already happening in the clientside context, so I tried the opposite, specifying that the cookie is removed from the serverside, but this just reports:

     

     

    Error: No peer connection established HTTP::cookie needs an established peer connection! (line 1)

     

     

    I guess an alternative would be to put an iRule on the outgoing packets that just removes the cookies. I tried to do that on the forwarding virtual servers that were set up for us, but apparently HTTP processing was not available. Sorry if this makes no sense, but I'm new to this device, and haven't been able to find a good overview as yet explaining contexts and how the outgoing virtual servers are associated with the output stream...

     

     

    Any other suggestions would be greatly appreciated!

     

     

    /nick