Forum Discussion
Brad_Baker
Aug 11, 2016Cirrus
Persist based on query string
Our QA team needs a way to specify a backend node via a query string and have all subsequent queries persist to that node for testing purposes.
I have written the following irule which send the re...
Vijay_E
Aug 11, 2016Cirrus
Your iRule seems to be just performing a load balancing decision and not persisting. So, you can use something like this:
when HTTP_REQUEST {
If the uri contains a query parameter named server
if { [HTTP::uri] contains "server" } {
Define a lowercase variable to store the server name
set webserver [URI::query [HTTP::uri]]
If the server query parameter matches an entry in the datagroup
if { [class match $webserver equals servername2ip_datagroup] } {
pool POOL_WITH_NODE
}
}
}
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