Forum Discussion
Branden_Visser_
Nimbostratus
Jul 09, 2008Switching persistence to new member
Hello,
We have 4 members in a pool. We want to implement a way to force a session onto a particular instance if we need to (by a URL prefix), and then that session would be maintained, even if we current had another session on another member. Is this possible?
This is where we're at:
(iRule attached to our VH with dest_addr persistence profile)
when HTTP_REQUEST {
set uri [HTTP::uri]
if { $uri starts_with "/www" } {
scan $uri /www%d%s host_num path
snip the host prefix from the URI
HTTP::uri $path
redirect the request to the appropriate member
switch $host_num {
1 {
pool WWW_Pool member $ip $port
}
2 {
pool WWW_Pool member $ip $port
}
4 {
pool WWW_Pool member $ip $port
}
5 {
pool WWW_Pool member $ip $port
}
}
}
}
when HTTP_RESPONSE {
if { $uri starts_with "/www" } {
persist dest_addr
}
}
In this iRule, anything request for www.myserver.com/www4/ would be redirected to member representing www4 with URI . This works, except for the part where you need to be persisted to the chosen host. I imagine the "persist dest_addr" is no where close. My hope was for that to rewrite the persistence record for the client. Do I have to implicitly remove it first? How does one do that?
Any advice is greatly appreciated.
Thanks,
Branden
- hoolio
Cirrostratus
Hi,
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