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.
...
Michael_Yates
Nimbostratus
May 13, 2010I 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.
Perhaps some of the others know of a better / different way:
This iRule should compare looking for two different values of the cookie. If neither match then the traffic should proceed to the Pool assigned to the Virtual Server.
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
}
}
HTTP::cookie Wiki Entry:
http://devcentral.f5.com/wiki/default.aspx/iRules/http__cookie.html
node Wiki Entry:
http://devcentral.f5.com/Wiki/default.aspx/iRules/node.html
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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