Forum Discussion
AdamFoot_1451
Nimbostratus
May 16, 2008Cookie and URI Decisions
Hi all,
Could someone just check this over for me please.The goal is to add some
persistence based on version cookie,so we can direct version specific traffic to specific pools.
...
AdamFoot_1451
Nimbostratus
May 21, 2008Hi Aaron,
Thanks for the steer.I think I'm there now..
when HTTP_REQUEST {
Extract the Cookie
set ID [findstr [HTTP::cookie "CookieX"] "Cookie" 10 ";"]
Extract the URI
set my_uri [string tolower [HTTP::uri]]
Log the values
log local0.info "ID is $ID default pool is [LB::server pool] URI is $my_uri"
If no Cookie exists
if {($ID equals "")} {
log local0.info "sending user to pool [LB::server pool]"
pool [LB::server pool]
Cookie and attachment URI exist
}
elseif { ($my_uri ends_with "/attachmentshare/upload.aspx") and not ($ID equals "")} {
log local0.info "URI contains $my_uri sending user to pool AVPool$ID"
pool AVG$ID
snatpool SNAT$ID
}
else
{
Cookie but no attachment URI
log local0.info "Cookie found sending user to Pool Pool$ID"
pool Pool$ID
}
}
Logging wil be removed for the live environment.
Thanks,
Adam
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
