Forum Discussion
Jesse_DeFer_418
Nimbostratus
Apr 28, 2005Persistence on URI
I've written the following universal persistence iRule, and it seems to work as intended. Anybody have any comments, suggestions, or improvements? In particular is there a better way than the regexp to do this? The sid is variable length.
when HTTP_REQUEST {
set server_id [ findstr [HTTP::uri] "sid" 4 "&" ]
if {$server_id ne ""} {
regexp {.*\.([0-9]+)$} $server_id match server_num
log "Force persist by sid to server $server_num"
use pool webfarm member 1.1.1.10$server_num 80
} else {
log "No sid, persisting by fallback method"
}
}
- unRuleY_95363Historic F5 AccountThat's pretty trick!
- Jesse_DeFer_418
Nimbostratus
Thanks! Unfortunately the period isn't unique. At least I have control over the IP addressing and can do tricks like this without having to maintain a data group.
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