Forum Discussion
Chad_Young_1032
Nimbostratus
Mar 12, 2008redirect external URL based on Pool member health
I am trying to create a iRule that will first check the health of a pool and then redirect the request to an external host based on pool availability. I have a need not to proxy the request, so I can't redirect to a LTM VIP or pool. I am trying to redirect to an external host. But I still need the utilize the LTM to base the decision of which URL to redirect to based on pool member availability.
Example:
user enters www.abc.com
iRule determines:
Pool A available then redirect to www.123.com
Pool A not available then redirect to www.456.com
Any help would be greatly appreciated!
2 Replies
- Nicolas_Menant
Employee
you can do that:
when HTTP_REQUEST {
if {[active_members poolA] > 0} {
HTTP::redirect www.123.com
} else {
HTTP::redirect www.456.com
}
}
OR you can do the following:
when HTTP_REQUEST {
HTTP::redirect www.123.com
}
in your HTTP profile you specify a fallback host to be www.456.com.
The default pool of your VS will be poolA
This way if at least one pool member in poolA is available then this iRule will be executed and the the user will be redirect to www.123.com
fallback host in http profile specify a redirect to do in case all pool members are down
HTH - Chad_Young_1032
Nimbostratus
Thank you for the prompt response. I will be testing this shortly.
Thanks again!
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