Forum Discussion
SivaYenduri
Cirrus
Mar 02, 2021Priority Group Activation Failback with HTTP Cookie Insert
Hello All, Can someone help me the below issue? We have a pool with 3 members. 2 members have high priority (Round Robin) and 1 member has low priority. When both the primary members go ...
SivaYenduri
Cirrus
Mar 04, 2021I have written the below iRule. Could you please validate?
when LB_SELECTED {
if { [IP::addr [LB::server addr] equals "low-priority-ip"] } {
if {[LB::status pool pool_name member 1.1.1.1 8080 ] or [LB::status pool pool_name member 1.1.1.2 8080 ] equals "up"} {
LB::reselect
}
}
}
1.1.1.1 and 1.1.1.2 are the High priority IPs of the same pool "pool_name"
Simon_Blakely
Employee
Mar 04, 2021That looks OK from a logical perspective.
Rather than checking if the High Priority pool members are available individually, I would just check to see if the number of available pool members is greater than 1, and reselect in that case.
when LB_SELECTED {
if { ([IP::addr [LB::server addr] equals "low-priority-ip"]) and ([active_members pool_name] > 1) } {
LB::reselect
}
}Give that a test.