Forum Discussion
Lotfi_Bouhaddad
Nimbostratus
Feb 20, 2007Persistence using IRule
Hi everyone,
I'm a newbie in irule programming and i need some help to do a persistence based on the http field X-Nokia-MSISDN.
how can i do to check the value of this field in th...
JRahm
Admin
Feb 20, 2007Yes, the value of the header will be the data in the persistence table. I believe HTTP::header is available in all 9.x versions.
I'm not sure what you mean regarding persisting on least connections. Least connections is a lb method, not a persist method. The LB method on your pool settings will dictate the server, so if you don't have a valid value supplied in X-Nokia-MSISDN you can persist the connection in another way, such as client TCP port, or source address, destination address, etc. In the example below, the other conditions persist via the client's source address.
when HTTP_REQUEST {
if { [HTTP::header exists "X-Nokia-MSISDN"] } {
if { [HTTP::header "X-Nokia-MSISDN"] != "" } {
persist uie [HTTP::header "X-Nokia-MSISDN"]
} else { persist source_addr }
} else { persist source_addr }
}
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