Forum Discussion
Ganesh_Ramamoor
Nimbostratus
Jan 25, 2006persistence on HTTP non-standard header
Hello!
Is it possible to have persistence based on a non-standard HTTP header? I can't use "starts_with" or "contains" because I won't know what this header value could be. But if header "HEADER1" has the value "userxyz@domain123.com", then for all the subsequent requests with that same value for HEADER1 I would like the requests to go to the same servers as before.
Thanks
5 Replies
- Colin_Walker_12Historic F5 AccountThis is certainly something that's possible via iRules.
It would look something like:when HTTP_REQUEST { if { [HTTP::header exists header1] } { persist uie [HTTP::header header1] } pool http_pool }
This would set the persistence record to use the value from the header1 header if it exists, regadless of client IP information or anything else. Otherwise, it would just send the request along to the pool as a normal, non persistent request.
HTH,
-Colin - Ganesh_Ramamoor
Nimbostratus
Thanks!
I tried that but it doesn't work for me. But now I think I know why, but I want to confirm this: I have two virtual servers, one with an external address and one with an internal address. Though both the virtual servers have the same iRule (with the persistence logic) assigned to them, I guess the persistence will be restricted to a virtual server? Meaning, there would be individual persistence tables for each virtual server, right?
If that's the case, is there a way to do this? My requirement basically is as follows: Client comes in with header1 thru' external-virtual-server and goes to server1. Client then contacts server2 thru' external-virtual-server. Now server2 uses header1 and needs to contact server1 thru' internal-virtual-server (this is where the persistence is used to contact the same server1)
Thanks - Ganesh_Ramamoor
Nimbostratus
Can anyone shed some light on this?
Thanks - drteeth_127330Historic F5 AccountTry adding the persist universal profile to the virtual servers and enable the "across virtuals" option.
- Ganesh_Ramamoor
Nimbostratus
That did it!
Thank you.
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
