Forum Discussion
annielee_5314
Nimbostratus
Mar 13, 2008HA in irule
Hi Experts,
Need advise on how to write the irule for the below requirement :
Source A
Source B
VIP A
Destination A
Destination B
Need to write an irule for the following rules :
- Source A access VIP A, F5 will pass to Destination A,
- Source B to Destination B,
- when Destination A is down, Source A will goto Destination B
- when Destination B is down, Source B will goto Destination A
Thanks in advance..
1 Reply
- The_Bhattman
Nimbostratus
Assuming it's an HTTP request
I would create 2 pools
poolA - Destination A priority 100 ratio 1 and Destination B priority 50 ratio 1 with 1 minimum member active <== Destination A is active and Destination B takes over when A fails
PoolB - Destination B priority 50 ratio 1 and Destination A priority 50 ratio 1 with 1 minimum member active <==Destination B is active and Destination A takes over when B fails.
Here is how I would probably write the codewhen HTTP_REQUEST { switch [IP::client_addr] { 192.168.1.1 { pool poolA } 192.168.1.2 { pool poolB } } }
Of course this assumes you know source A and source B. If your sources start to get bigger or change into specific networks then you might want to
when CLIENT_ACCEPTED {
if {[IP::addr [IP::client_addr] equals 192.168.1.0/24]} {
pool poolB
} {
else if { do something }
}
I hope that helps
CB
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
