Forum Discussion
Error page if a FQDN node is unavailable
Hi,
Using an LTM running V11.5.4, I load balance a web application to a FQDN node with an iRule :
when HTTP_REQUEST {
set dest [RESOLV::lookup @8.8.8.8 -a FQDN-of-the-node]
log local0.info "destination address : $dest"
if { $dest ne "" } {
node $dest
log local0.info "node used : $dest"
} else {
HTTP::respond 302 Location "location-of-an-error-page"
}
}
This iRule redirects to an error page only if the RESOLV fails, but if the application on the node is unavailable then the client request must also be redirected to this error page. How can this be configured? For nodes having a fixed IP address this can be achieved by assigning a Monitor to the node, but the node $dest has a dynamic IP address...
Regards,
Ivo
- JG
Cumulonimbus
I guess you must already know that an upgrade to v11.6.1 would be the best way out of this problem, but you can't upgrade for some reason.
You could alternatively define a fallback host in your http profile to serve this error page.
- JG
Cumulonimbus
Then try the following:
when HTTP_REQUEST { set dest [RESOLV::lookup @8.8.8.8 -a FQDN-of-the-node] log local0.info "destination address : $dest" if { $dest ne "" } { node $dest log local0.info "node used : $dest" } else { HTTP::fallback "http://host.domain.com/redirect.html" } }
.
Recent Discussions
Related Content
* 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