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 my node send 500 error. I want mark this node as down. And i want that this request be sent to another node.
set poolname "TEST"
set fqdn "TEST.com"
set NbNode 2
when HTTP_REQUEST {
if {[HTTP::host] equals $fqdn}
{
pool $poolname
}
}
when HTTP_RESPONSE {
if{([HTTP::status] == 500) or ([HTTP::status] == 404) or ([HTTP::status] == 503)}
{
LB::reselect pool $poolname
if{[active_members $poolname] > $NbNode}
{
LB::down
}
}
}
thank.