Forum Discussion
Header persistence from client
I'm working on an iRule to look at the POST header from a client to look at "jsessionid" and add a 10 minute persistence timer. I created the universal profile and the iRule, but the F5 is only sending data to 1 server.
*when HTTP_REQUEST { if {[HTTP::header exists "jsessionid"]} { persist uie {persist_600}} *
- Jeff_Maddox_394Historic F5 Account
You need to add a persistence record on the HTTP_RESPONSE using persist uie add.
- JG
Cumulonimbus
- VFB
Cirrus
You lead me to the resolution. I already had the universal persistence record to parse for the header, but it's the client doing a POST, so I changed HTTP_REQUEST to HTTP_RESPONSE and it fixed the issue. Thanks much
- VFB
Cirrus
It's partially working. Now they want a 35 minute persistence timer once the iRule sees the header. I added the following but I don't see a persistence record in the F5
when HTTP_REQUEST { if {[HTTP::header exists "jsessionid"]} { {[ persist uie {persist_600] 2100}}
- Jeff_Maddox_394Historic F5 Account
You apply the timer when you add the persistence record into the table. Below adds a persistence record with 600 second timeout. You add the record on the initial response when the cookie is set. then you persist on it in subsequent requests.
when HTTP_RESPONSE { look for jsession id cookie if { [HTTP::cookie "JSESSIONID"] ne "" } { persist add uie [string tolower [HTTP::cookie "JSESSIONID"]] 600 if exists and has a value, add a persistence record } }
- VFB
Cirrus
How will that rule impact my header? What I'm trying to accomplish is if I see header "SessionID", apply a 35 minute sticky to it
- Jeff_Maddox_394Historic F5 Account
So not jsessionid, but a Header SessionID: with a value?
- VFB
Cirrus
Yes. The client is doing a POST with "SessionID" as the header value, and based on that value, add a 35 minute sticky timer
- Jeff_Maddox_394Historic F5 Account
Ok, is "SessionID" the name of a header, or is it a value? if it is a value, what is the name of the header? if you have a live http header capture, it would help. it should be straight forward, i am just unclear on some specifics.
- VFB
Cirrus
SessionID is the name of the header. My apologies.
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