Forum Discussion
Bret_McGinnis_1
Nimbostratus
Jan 09, 2006Action On Service Down vs LB::reselect
Hi,
I would like to know the advantages/disadvantage and when I should use "Action On Service Down" vs LB::reselect. Things like:
- Performance diferences
- Does "Action On ...
JRahm
Admin
Jul 10, 2006What occurs after the LB::reselect in the LB_FAILED event? Does it just reselect a server, or does it retrigger any of the prior events? I am trying to account for clients who don't allow cookies with this rule (I am using cookie insert persistence on the virtual as well)
when HTTP_RESPONSE {
if { [HTTP::cookie exists "JSESSIONID"] } {
set trimID [lindex [split [HTTP::cookie "JSESSIONID"] "!" ] 0 ]
if { [session lookup uie $trimID] equals "" } {
session add uie $trimID [IP::server_addr] 1800
log "added server entry [session lookup uie $trimID] for jsessionID $trimID "
} else {
log "existing server entry [session lookup uie $trimID] for jsessionID $trimID"
}
}
}
when HTTP_REQUEST {
if { [active_members MyPool] == 0 } {
HTTP::redirect "http://[HTTP::header "X-Forwarded-Host"]/unavailable/unavailable.html"
}
if { [HTTP::header exists "X-Forwarded-Host"] } {
HTTP::header replace "Host" [HTTP::header "X-Forwarded-Host"]
}
if { not [HTTP::cookie exists "MyCookie"] } {
if { [findstr [HTTP::uri] "jsessionid" 11 "!"] != "" } {
pool MyPool member [session lookup uie [findstr [HTTP::uri] "jsessionid" 11 "!"] ]
log "jsessionID [findstr [HTTP::uri] "jsessionid" 11 "!"] sent to [session lookup uie [findstr [HTTP::uri] "jsessionid" 11 "!"] ]"
} else {
if { [HTTP::cookie exists "JSESSIONID"] } {
log "used Cookie Insert, value is [HTTP::cookie "MyCookie"]"
}
}
}
}
when LB_FAILED {
LB::reselect pool MyPool
LB::reselect
log "server reselected due to failure!"
}
I am getting this error after the server fails:
Jul 10 11:24:20 tmm tmm[11686]: 01220002:6: Rule intres_prod-rule : server reselected due to failure!
Jul 10 11:24:20 tmm tmm[11686]: 01220002:6: Rule intres_prod-rule : server reselected due to failure!
Jul 10 11:24:20 tmm tmm[11686]: 01220002:6: Rule intres_prod-rule : server reselected due to failure!
Jul 10 11:24:20 tmm tmm[11686]: 01220002:6: Rule intres_prod-rule : server reselected due to failure!
Jul 10 11:24:20 tmm tmm[11686]: 01220002:6: Rule intres_prod-rule : server reselected due to failure!
Jul 10 11:24:23 tmm tmm[11686]: 01220002: repeated 56300 times
My problem is that the pool member is set by the value in the session table, and the LB::reselect doesn't seem to reselect anything other than the failed instance. I have 16 members in the pool, all up except the instance we failed for testing. Any ideas?
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