Forum Discussion
iRule Persistence
Hi,
I am hoping someone can help? I am having trouble keeping persistence when redirecting to a new pool group.
The setup I have at the moment is:
VIP
Pool - 2 nodes
iRule
when HTTP_REQUEST {
Check the URI, set to lowercase
persist cookie
switch -glob [string tolower [HTTP::uri]] {
"/Folder*" -
"/Folder2/*" -
"/Folder3/*"
{pool HTTPS-ThirdPartyApps} 2 nodes
}
}
When users are filling in the forms under the HTTPS-ThirdPartyApps pool they are being bounced between the 2 servers rather than sticking to one of them.
My questions are:
1. Is there anyway to keep the session to one server?
2. Would I be better using an HTTP Class? And if I did this, would it keep the session persistence?
Thanks for your help
Nick
3 Replies
- nitass
Employee
if you want to persist to HTTPS-ThirdPartyApps pool only, why won't you enable persistence only when the pool is selected?[root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { persist none switch -glob [string tolower [HTTP::uri]] { "/folder*" - "/folder2/*" - "/folder3/*" { persist cookie pool HTTPS-ThirdPartyApps } } } }
- Hi,
- nitass
Employee
I assumed the default persistence profile would deal with the pool under the VIP? If this is the case then I could just use the persist cookie when the iRule pool is selected, but having he persist cookie at the top of the iRule should of worked as well should it not? yes, i think so.
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