Forum Discussion
Joshua_Messenge
Nimbostratus
Oct 08, 2015Active / Passive slightly diffrent recovery
I need to setup an active / passive deployment where:
1.) Active server takes all communications
2.) when Active server fails all communications go to passive
3.) If active server recovers all traffi...
ijdod
Nimbostratus
Oct 15, 2015Some experimenting later. I'm sure there is room for improvement, but it seems to do the job.
when CLIENT_ACCEPTED {
Active/Passive iRule. IJdo Dijkstra 15-10-2015
Pool A should be active, and failover to B. Pool B should remain active even if pool A returns.
Failback occurs when pool B is down.
User table entry FailOver for failover state. 0 = normal, 1 = Failover
Checked for FailOver!=1 to allow for non-set condition.
Normal situation. Pool A is up, and FailOver != 1. Traffic to pool A
if { [table lookup -notouch FailOver]!=1 && [active_members /Test/pool-test-A]!=0 } {
pool /Test/pool-test-A
Normal failed-over situation. FailOver = 1 and pool B is up.
}elseif { [table lookup -notouch FailOver]==1 && [active_members /Test/pool-test-B]!=0 } {
pool /Test/pool-test-B
Actual failover trigger. Pool A is down, FailOver != 1 Traffic to Pool B
} elseif { [table lookup -notouch FailOver]!=1 && [active_members /Test/pool-test-A]==0 } {
table set FailOver 1 indefinite
pool /Test/pool-test-B
Failback when pool B goes down and FailOver is 1. Traffic to pool A
No strict need to check if pool A is up (with both pools down service is lost); but it seems neater.
} elseif { [table lookup -notouch FailOver]==1 && [active_members /Test/pool-test-A]!=0 && [active_members /Test/pool-test-B]== 0 } {
table set FailOver 0 indefinite
pool /Test/pool-test-A
Happens is all the above conditions are not met. Optionally additional conditions could be used for sorryservers.
} else {
pool /Test/pool-test-B
}
}
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