BASLI_amine_788
Aug 29, 2006Nimbostratus
How to use several pools and persistence profils with cookie insert method in an iRule
Hi,
We upgrade our Bigip from 4.2 to 9.2.3. In 4.2 the persistence was set on pools.So to keep our persistence in v9 we modified our irules to insert the right cookie depending on the pool we match. Exemple :
when HTTP_REQUEST {
if { [HTTP::host] matches_regex "^(www.)?cetelem.pt$"} {
redirect to "https://www.bancocetelem.pt"
}
elseif { [HTTP::host] matches_regex "^bancocetelem.pt$"} {
redirect to "https://www.bancocetelem.pt"
}
elseif { [HTTP::host] matches_regex "^www.bancocetelem.pt(:443)?$"} {
if { [HTTP::uri] starts_with "/PtDirect"} {
persist cookie insert Prf_cookie_Xnet-ptdirectnew
pool P_http_ptdirectnew
}
elseif { [HTTP::uri] starts_with "/PtHomeBK"} {
persist cookie insert Prf_cookie_Xnet_pthomebk
pool P_http_pthomebk
}
else {
persist cookie insert Prf_cookie_Xnet-ptdirect
pool P_http_ptdirect
}
}
}
In this example you can see the command we added to insert the cookie. In addition to bo able to do so we assigned a default persistance profil.
We encouter problems and the persistence doesn't work correctly. We lose connection and sometimes we are redirect to two differents members...
Can you please help us to configure correctly persistence using cookie insert method with iRules
Thank you