Forum Discussion
Geordie_32542
Nimbostratus
May 14, 2008Load balance only to one peer if another computer is down
Hi guys, first post so please don't bite the newb.
I'm newish to Big IP and entirely new to iRules. We have a setup whereby four servers are deployed, two as COM+ proxies to two backend application servers; the Big IP loadbalances to the two proxies.
It seems reasonably straightforward from what I've read to develop rules that loadbalance between two web servers, sending requests entirely to one if the other becomes unavailable - but because these two servers in our instance are proxies we want to be able to send requests exclusively to one proxy if the app server BEHIND the other proxy is down. Otherwise the proxy will continually be hit, the Big IP will continue to pat itself on the back for a job well done and the requests won't be going through the proxy to the backend app server because it's blissfully unavailable.
Can someone give me a pointer either to how, or where to read about how, to load balance two hosts based on whether two OTHER hosts are available?
Thanks for your help in advance.
2 Replies
- Don_MacVittie_1Historic F5 AccountHi gguy,
Conveniently, this is in the wrong forum. I say conveniently because you're asking about iRules to achieve your goals, but I would use iControl - there is more than one way to achieve what you want, possibly someone else has a better solution, but here's what I would do.
Write a small .NET app that monitors the backend - from as simple as a ping to as complex as using the MS Management interface. When the backend application is down, make an iControl call to change the enabled state of the COM+ proxy to down. When the backend server comes back up, change the state back to enabled. The relevant bit of iControl is: LocalLB::NodeAddress::set_monitor_state(), which allows you to control the status of a given node (in this case the address of the proxy).
I hope that helps. There are some great informational articles about iControl on the site, we're happy to point you at them, but the best reference is the iControl Wiki: http://devcentral.f5.com/wiki/default.aspx/iControl/APIReference.html
Regards,
Don. - Deb_Allen_18Historic F5 AccountYou could also create an application health monitor on LTM that requests a resource from the app server via the proxy, and marks the proxy down if the expected response is not received. (Click here)
If the proxy is transparent, you can configure the monitor as transparent, and it will forward the request to the appservers' IP address via the proxy's MAC address.
If you'd like more info on that solution, please post back in the Mgmt & Monitoring forum: (Click here)
HTH
/deb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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