Forum Discussion
rjordan
Jan 12, 2011Nimbostratus
Base member status on another member's monitor
We are hosting a couple HTTP apps for a customer. They have two web servers in their cluster. We have 3 virtual servers, each having their own pool with unique IPs. Here is what it looks like:
VS-1
Pool-1
192.168.1.20:80
192.168.1.40:80
VS-2
Pool-2
192.168.1.21:80
192.168.1.41:80
VS-3
Pool-3
192.168.1.22:80
192.168.1.42:80
Their "main" app is running on VS-1. If a pool member goes down in Pool-1, the members from the same server on Pool-2 and Pool-3 should be marked as down. For example, if 192.168.1.20 goes down, 192.168.1.21 and 192.168.1.22 should also be marked down.
I can think of two simple workarounds:
1. Configure all virtual servers to use the same pool and require the customer to reconfigure the web server bindings.
2. Create two monitors and set the IP alias to 192.168.1.20 and 192.168.1.40 and assign them to the appropriate members in Pool-2 and Pool-3.
The first solution isn't really viable because they can't use named based hosting on their web server. The second solution would involve 3x the health checks, which the customer is trying to stay away from.
I'm assuming this can be done with iRules, but I haven't done anything like this before. I'm not too sure about parsing the list of active members. Below is a draft of what I think would work. Is anyone doing anything similar? Or is there a better way to do this?
when HTTP_REQUEST {
set members [active_members -list Pool-1]
if { not (members [contains 192.168.1.20]) } {
LB::down pool Pool-2 member 192.168.1.21 80 }
if { not (members [contains 192.168.1.40]) } {
LB::down pool Pool-2 member 192.168.1.41 80 }
pool Pool-2
}
- Chris_MillerAltostratusWhen I've done something similar, I've used option 2 above. You're definitely on the right track.
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