Jacob_Harres
May 05, 2006Nimbostratus
Non-persistance for select URIs
We have a service that is currently setup behind a Cisco Content switch. The setup that is currently in place applys a persistance cookie to all traffic, except traffic to certain URIs. I am migrating this service from behind our CCS to sit behind our BigIPs and would like to replicate this functionality with an iRule. Here is how I'm approaching it;
I've a pool created for the web servers and I've created a VS with the attached iRule;
when HTTP_REQUEST {
if { [URI::path] contains "/fileupload/file_upload.aspx" } {
pool InterAct-Staging
} else {
persist cookie
pool InterAct-Staging
}
}
What I'm intending this to do is evaluate when a request hits the VS, if part of the URI has the file upload script, it sends the traffic directly to the pool, without persistance. However, if the request does not contain the file upload script, it applies a cookie and then sends it to the pool.
As a noob to iRules, I'm not sure if I'm doing this right, so I'd like some feedback from those of you with more experience. Am I on the right track?
Regards,
Jacob