Forum Discussion
James_Thomson
Employee
Dec 10, 2004mapclass2node
Along the same lines off an an earlier post by Natty about persistence. I'm trying to just read a cookie that is handed out by the server and persist a user on it. One example is where the cookie is s...
David_Zuk_10432
Nimbostratus
May 17, 2005Joe,
I think I figured out where I went wrong. We had the persistence in v4.5 like the first guy did using the mapclass2node line in the pool section. Since I took over mid-stream, I didn't know that part was there. I need to duplicate that in v9.0.3. In 4.5 it was
mapclass2node(http_cookie("SERVER"), staging_nodes)
with a string class:
NV 10.96.8.88:80
EP 10.96.8.111:80
and using that simple rule from above. I'm not sure if that was the proper way to do things, but it works in 4.5
In 9.0.3, I've created the "data group" the same, now I need to make my virtual server use the mapclass2node option, which is now findclass?
So should I use the example from above :
when HTTP_REQUEST {
set server [HTTP::cookie "server"]
set entry [findclass $server $::staging_nodes]
if { $entry ne "" } {
node [getfield $entry " " 2]
} else {
log "Bad server cookie: $server"
reject
}
}
Also, I need this to work for both port 80 and port 443. Would the "data group" need the same IP's but with 443 at the end?
And Thanks. I really appreciate the help.
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