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 the http header and depend to the value the F5 will make persistence.
her an example of the http header with X-Nokia-MSISDN having a value 33699999999
GET http://www.google.fr HTTP/1.1
user-agent: F5Ffff
X-Nokia-MSISDN: 33699999999
X-Up-Calling-Line-Id: 33699999999
Host: www.google.fr
Pragma: no-cache
Cache-control: no-cache
Thanks everyone for your help
Regards
Lotfi
- JRahm
Admin
You should be able to persist without setting the variable:when HTTP_REQUEST { if { [HTTP::header exists "X-Nokia-MSISDN"] } { persist uie [HTTP::header "X-Nokia-MSISDN"] } }
- Lotfi_Bouhaddad
Nimbostratus
Hi , - JRahm
Admin
Yes, the value of the header will be the data in the persistence table. I believe HTTP::header is available in all 9.x versions.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 } }
- Jason_Hook_4092
Nimbostratus
I know this is an old thread, but will persist uie also work in 10.x or would there be a new way of accomplishing the same? - hoolio
Cirrostratus
Hi Jason,when HTTP_REQUEST { if { [HTTP::header value "X-Nokia-MSISDN"] ne ""} { persist uie [HTTP::header value "X-Nokia-MSISDN"] 3600 pool alternate_pool } }
- Jason_Hook_4092
Nimbostratus
Can I handle the following then with the suggested persistency and OneConnect solution?
- hoolio
Cirrostratus
Hi Jason, - Jason_Hook_4092
Nimbostratus
Our app is stateless. We don't want to tie a user to one server unless OneConnect on all connections through the VIP is required.
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