Forum Discussion
Jacob_Harres
Nimbostratus
May 05, 2006Non-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
1 Reply
Sort By
- Jacob_Harres
Nimbostratus
Colin, thank you for the feedback, the link was indeed quite helpful.when HTTP_REQUEST { if { [URI::path] contains "/fileupload/file_upload.aspx" } { persist none pool InterAct-Staging } else { persist InterAct-persisance-profile pool InterAct-Staging } }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects