Forum Discussion
Marcus_59536
Nimbostratus
Jun 04, 2010Checking if pool is up before using LB::SELECT in HTTP_REQUEST
I was wondering if there is any way to check if the virtual server is up before implementing LB::SELECT inside of an HTTP_REQUEST event of an iRule?
code:
when HTTP_REQUEST {
if { [HTTP::uri] eq...
Michael_Yates
Nimbostratus
Jun 04, 2010If you want to be more dynamic you will have to go up a level and check in the CLIENT_ACCEPTED, doing is a bit more restrictive on what you can do though (HTTP::redirect is no longer available), but you can verify that the pool has members, if so it will pass through and you can do your LB::select in the when HTTP_REQUEST event. If no pool members are available, you route them somewhere else before the HTTP_REQUEST event and no further iRule processing is done:
See CLIENT_ACCPTED wiki entry at the bottom to see available commands within this event: http://devcentral.f5.com/wiki/default.aspx/iRules/CLIENT_ACCEPTED.html
when CLIENT_ACCEPTED {
if { [active_members [LB::server pool]] == 0 } {
pool website_down_pool
}
}
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