Forum Discussion
skunk69_85565
Nov 06, 2007Historic F5 Account
need to insert new info into HTTP query or uri
Hi everyone,
I need some advice here, please.
I am currently developing an iRule which will in the end send user requests to different pools based on IP addr, user agents, an exist...
skunk69_85565
Nov 06, 2007Historic F5 Account
Aaron,
good point and thanks for the hint.
Actually I have no default pool, just site A or B.
I solved the problem just by including my if { $qstring starts_with "/A"} {.... routine into the big elseif routine:
...
elseif { [HTTP::cookie exists "AB_test"] } {
not a bad ip addr and no crawler, look for existing cookie
set client_id [HTTP::cookie "AB_test"]
this is used to direct the traffic
set qstring [HTTP::query]
log local0. "Cookie found= $client_id"
log local0. "old query string= $qstring "
set qstring $client_id
log local0. "new query string= $qstring "
now the load balancing is done
if { $qstring starts_with "A"} {
pool poolA
log local0. "send to poolA"
return
}
elseif { $qstring starts_with "B"} {
pool poolB
log local0. "send to poolB"
return
}
}
else {
.....
so, now it is working and I am thinking of a good way to get my requests to persist as I do not see a unique value for each (not ip, not the cookie) maybe a hash?
Patrick
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