Forum Discussion
tidenz_92110
Nimbostratus
May 13, 2010select member based on cookie in request
Hi Guys,
Is it possible to select a specific pool member based on a cookie in the request?
so if my cookie had a value of "cookie1" then it should select pool member 1 etc.
The dev team wants to be able to select a specific pool member behind the F5.
I am hoping then the insert cookie option will take care of the subsequent requests to that pool member.
in pseudo code
On a http request we will check for a cookie "mycookie" and "mycookie2" if only "mycookie" exsists and the value matches a "entry" in a data class and it is coming from a trusted ip address then we will select a specific pool member.
If "mycookie" and "mycookie2" exists then we should do nothing as mycookie2 was inserted by the F5 in the previous response.
In the http response we want to insert an encrypted cookie using the cookie persist and encrypt options in the profiles.
is my pseudo code workable on a 9.4.7 LTM?
Thanks in advance.
- hoolio
Cirrostratus
Hi Tidenz, - Michael_Yates
Nimbostratus
I think this is a start to what you are wanting to do. I would suggest looking at the HTTP::cookie Wiki entry to see what else you can do with it and then maybe searching DevCentral for more uses of HTTP::cookie.when HTTP_REQUEST { if { [HTTP::cookie value "some.cookie.value"] } { node 192.168.1.1 80 } elseif { [HTTP::cookie value "some.different.cookie.value"] } { node 192.168.1.2 80 } }
- tidenz_92110
Nimbostratus
Thanks for the responses, - hoolio
Cirrostratus
As for selection based on the query string that looks like a good option and far easier to manage. The only issue i can see is what happens with pool members that are disabled? are they candidates for LB selection?
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