Forum Discussion
Feb 03, 2015
Hi,
here is an generic iRule approach. Source address persistence is used. Other persistence methods not tested yet:
when LB_FAILED {
foreach pool_member [members -list [LB::server pool]] {
if { [LB::status pool [LB::server pool] member [getfield $pool_member " " 1] [getfield $pool_member " " 2]] ne "down" } {
LB::reselect pool [LB::server pool] member [getfield $pool_member " " 1] [getfield $pool_member " " 2]
}
}
}
when PERSIST_DOWN {
foreach pool_member [members -list [LB::server pool]] {
if { [LB::status pool [LB::server pool] member [getfield $pool_member " " 1] [getfield $pool_member " " 2]] ne "down" } {
LB::reselect pool [LB::server pool] member [getfield $pool_member " " 1] [getfield $pool_member " " 2]
}
}
}
when LB_SELECTED {
persist add source_addr [IP::client_addr]
}
Thanks, Stephan
PS: Just tested "persist cookie insert" successfully. Make sure you have the right persistence profile assigned in your virtual server resource settings.