Forum Discussion
damon_schott_19
Nimbostratus
Feb 26, 2010Pin down a 1 to 1 mappping after node failure.
I currently have the following iRule that pins down load balancing decisions in a 1 to 1 mapping based on source address, this works great except for when there is a failure on any 1 of the port 17000 nodes. There is a persistency requirement that breaks when any 1 of these nodes fail. I am looking for a way to expand on this iRule to basically say "if LB::status pool = "down", then go to the next available node in the pool (meanwhile keeping persistent until the original node comes back online)
when CLIENT_ACCEPTED {
if {[IP::addr [IP::remote_addr] equals 172.17.168.230/32] }{
if { [LB::status pool [LB::server pool] member 172.17.168.212 17000 ] == "up" }
pool [LB::server pool] member 172.17.168.212 17000
}
}
elseif {[IP::addr [IP::remote_addr] equals 172.17.168.231/32] }{
if { [LB::status pool [LB::server pool] member 172.17.168.213 17000 ] == "up" }
pool [LB::server pool] member 172.17.168.213 17000
}
}
elseif {[IP::addr [IP::remote_addr] equals 172.17.168.232/32] }{
if { [LB::status pool [LB::server pool] member 172.17.168.214 17000 ] == "up" }
pool [LB::server pool] member 172.17.168.214 17000
}
}
}
- The_Bhattman
Nimbostratus
Hi Damon,when CLIENT_ACCEPTED { if {[IP::addr [IP::remote_addr] equals 172.17.168.230/32] }{ if { [LB::status pool [LB::server pool] member 172.17.168.212 17000 ] == "up" } pool [LB::server pool] member 172.17.168.212 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.213 17000 ] == "up" } pool [LB::server pool] member 172.17.168.213 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.214 17000 ] == "up" } pool [LB::server pool] member 172.17.168.214 17000 } } elseif {[IP::addr [IP::remote_addr] equals 172.17.168.231/32] }{ if { [LB::status pool [LB::server pool] member 172.17.168.213 17000 ] == "up" } pool [LB::server pool] member 172.17.168.213 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.214 17000 ] == "up" } pool [LB::server pool] member 172.17.168.214 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.212 17000 ] == "up" } pool [LB::server pool] member 172.17.168.212 17000 } } elseif {[IP::addr [IP::remote_addr] equals 172.17.168.232/32] }{ if { [LB::status pool [LB::server pool] member 172.17.168.214 17000 ] == "up" } pool [LB::server pool] member 172.17.168.214 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.212 17000 ] == "up" } pool [LB::server pool] member 172.17.168.212 17000 } elseif { [LB::status pool [LB::server pool] member 172.17.168.213 17000 ] == "up" } pool [LB::server pool] member 172.17.168.213 17000 } } }
- damon_schott_19
Nimbostratus
Thanks Bhattman, I think that IS what I was looking for; I applied this update to the VIP and will perform the testing. Thanks again. - The_Bhattman
Nimbostratus
Hi Damon,when CLIENT_ACCEPTED { if {[IP::addr [IP::remote_addr] equals 172.17.168.230/32] }{ pool pool_230 } elseif {[IP::addr [IP::remote_addr] equals 172.17.168.231/32] }{ pool pool_231 } elseif {[IP::addr [IP::remote_addr] equals 172.17.168.232/32] }{ pool pool_232 } }
- damon_schott_19
Nimbostratus
Bhattman, thank you, that is terrific. I will certainly give that a try. Thanks again for all your assistance
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