Forum Discussion
Jonathan_Mansfi
Nimbostratus
Jun 06, 2016iRule to allow developers to test specific pool members
I'm new to iRule development, so I apologize if I'm asking a silly question. My department manages the F5 infrastructure, but the resource nodes are managed by multiple internal customers. I have cus...
stan_piron
Cumulonimbus
Jun 07, 2016Hi,
you can use the following irule:
when CLIENT_ACCEPTED {
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
set target_member [URI::query [HTTP::uri] server]
if {!($target_member eq "")} {
pool $default_pool member $target_member
HTTP::uri [string map -nocase [list "&server=$target_member" "" "?server=$target_member" "" ] [HTTP::uri]]
}
}
Then, the developer may append parameter server=1.2.3.4 for the first request, then the default persistence profile will be used to persist for next requests.
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