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...
Shay_Ben-David1
Nimbostratus
Nov 02, 2006thanks for the assist, but nothing here helps in this, i need irule example for track the client request and decide wich server to get the client according to the cookie name and value, here is an example of what i try, but i can't get it work, when i come to the vip it do load balancing eventhough i have irule on the vip.
when HTTP_REQUEST {
if { [HTTP::cookie exists "amlbcookie"] } {
switch [HTTP::cookie "amlbcookie"] {
*server1* { node 192.168.10.66 }
*server2* { node 192.168.10.67 }
log "Cookie header: [HTTP::cookie exists amlbcookie]"
}
}
else {
pool skyp-AM-1873
}
}
"amlbcookie" is the cookie name and the value can be "01" for node 192.168.10.66, nad value "02" for node node 192.168.10.67 , hope this can clear few things.
10nx
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