Forum Discussion
Shay_Ben-David1
Nimbostratus
Nov 01, 2006choos nodes according to cookie name and value ?
i need irule to choose between nodes (servers) according to the cookie comes in the http/https request, lets say if client came with cookie name: abc and value 1, it will go to server A, if it comes w...
hoolio
Cirrostratus
Nov 02, 2006Hi,
If the cookie values are literally 01 and 02, you would need to modify the *server1* and *server1* to 01 and 02. Also, try adding some logging to the switch statement so you can see which condition was met:
when HTTP_REQUEST {
if { [HTTP::cookie exists "amlbcookie"] } {
log local0. "[HTTP::cookie "amlbcookie"]"
switch -glob [HTTP::cookie "amlbcookie"] {
*01* {
node 192.168.10.66
log local0. "matched 01"
}
*02* {
node 192.168.10.67
log local0. "matched 02"
}
}
}
else {
pool skyp-AM-1873
log local0. "default"
}
}
Aaron
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