Tadaoki_237078
Dec 11, 2017Nimbostratus
Cookie persistence with multiple cookies (iRules/cookie persistence profile)
Hi all,
I have some questions regarding cookies and how they are handled by iRules and/or profiles:
ltm rule /Common/rule_foobar {
when HTTP_REQUEST {
if { [HTTP::cookie exists "BIGipServerpool_foo"] } {
if { [active_members pool_foo ] > 0 } {
pool pool_foo
}
return
} elseif { [HTTP::cookie exists "BIGipServerpool_bar"] } {
if { [active_members pool_bar ] > 0 } {
pool pool_bar
}
return
}
switch -glob [HTTP::uri] {
"/foo*" {
if { [active_members pool_foo ] > 0 } {
pool pool_foo
}
}
default {
if { [active_members pool_bar ] > 0 } {
pool pool_bar
}
}
}
}
Question 1:
Let's say we have an iRule like the one above, and pool_foo and pool_bar have 2 members each called foo_a, foo_b and bar_a, bar_b(respectively).If the client has a cookie called "BIGipServerpool_foo", he/she will be directed to pool_foo(right?), and if the cookie contains information for foo_a, then he/she will get load-balanced to foo_a?
(and foo_b if the cookie contains information about foo_b?)Is it possible for the client to have a cookie( or a cookie-pair) containing information for both foo_a and foo_b? And what happens with the traffic when he/she has?
(Or is it only possible to have one cookie per pool (and not members)?)Question 2:
If the Virtual Server associated with the iRule, has a cookie persistence profile configured, does the cookie handling part of the iRule mean anything??And again, what will happen if the client access with more than one cookie(a AND b) and the processor is the profile and not the iRule?
Thank you in advance,
Kai