Forum Discussion
Exploitation_Ca
Oct 23, 2013Nimbostratus
IRULES - LB::reselect
Hello,
I want integrate this irule on my loadbalancer.
But you can say me if this irule is totaly correct?
Because I dont know how "lb::reselect" will react.
When my request arrive on my node, if...
What_Lies_Bene1
Oct 23, 2013Cirrostratus
OK, so, you may want to always specify the fqdn as lowercase and also lower what your matching against:
if { [string tolower [HTTP::host]] equals $fqdn }
I'd also reorder your logic as it's possible you'll mark the newly selected node as down:
when HTTP_RESPONSE {
if { ([HTTP::status] == 500) or ([HTTP::status] == 404) or ([HTTP::status] == 503) } {
if { [active_members $poolname] > $NbNode } {
LB::down
LB::reselect pool $poolname
}
else {
LB::reselect pool $poolname
}
}
}
I'm pretty sure you could shorten the HTTP::status lookup too but I'm too tired to try.
Also not you don't have any spaces between your if's and the opening brace {.
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