Forum Discussion
Stevenson_88156
Nimbostratus
Jul 04, 2010iRule Help!!
I am newbie with iRule and I am just trying out some sample codes to test out how iRule works. I started to developed a simple custom persister whereby a cookie is created to store the serverid on the...
hoolio
Cirrostratus
Jul 05, 2010I couldn't remember if the pool name was included in LB::server output in HTTP_RESPONSE. If it is, as you've shown, you can use scan to parse the three fields:
when HTTP_REQUEST {
...cookie decryption above
Parse the pool name, IP and port from the cookie
if {[scan [HTTP::cookie cookie] {%s %s %s} pool ip port] == 3}{
log loca0. "Parsed $pool $ip $port"
Select the pool member
pool $pool member $ip $port
} else {
log local0. "Couldn't parse pool, IP and port from [HTTP::cookie cookie]"
}
}
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
