Forum Discussion
URI matching "starts_with" not working in iRule
I am trying to select a pool based on a URI that begins with /token but it is not working. iRule and /var/log/ltm pasted below. Thanks in advance for help.
when HTTP_REQUEST {
snip
if {[string tolower [HTTP::uri]] starts_with "/token"} {
pool signon_https_pool member 1.2.3.4
if { $logging } {
log local0. "[LB::server addr] is the pool member selected for token URI"
}
}
else {
pool normal_https_pool
if { $logging } {
log local0. "[LB::server addr] Default pool picked"
}
}
}
+++++++++++++++++++++++++++
Rule /Common/ifb_irule_apipoc_pool_select : [8143] ... is the client IP address
Rule /Common/ifb_irule_apipoc_pool_select : [8143] HOST = hhh.hhh.hhh.hhh:8243
Rule /Common/ifb_irule_apipoc_pool_select : [8143] URI = /token
Rule /Common/ifb_irule_apipoc_pool_select : ppp.ppp.ppp.ppp Default pool pickedHi Steve,
The iRule looks good. Probably a problem within the
part or recent changes are not getting active (aka. open new TCP connections after changing the iRule).snip
Another problem could be, that you're trying to select a specific member for the given pool and that active persist entries are still getting prefered. Last but not least make sure to assign a OneConnect Profile if you're trying to switch between members of the same pool.
How about using a dedicated pool with just the 1.2.3.4 as member? This would eleminate many side effects...
Cheers, Kai
Recent Discussions
Related Content
* 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