Forum Discussion
sriramgd_111845
Nimbostratus
Dec 10, 2008inspect start of payload
We are planning to add an 'overload' iRule in production, to allow for redirect in case of overload of our application server.
We want users who are already logged to continue with t...
hoolio
Cirrostratus
Dec 11, 2008Sorry for the threadjacking, but thanks Mike for the alternate link. It looks like you fixed the standard page as well. That's a novel rule. Thanks for posting it.
I think you could potentially use a meta-refresh (which doesn't depend on javascript and shouldn't affect CPU usage on the client) to automatically have the client automatically retry the request. Here is a simple proof of concept for the meta-refresh:
[code]
when RULE_INIT {
Trigger a meta-refresh every X seconds
set ::refresh_interval 30
HTML content containing meta-refresh to the same requested host/uri
set ::html_response_string "
Retrying...
Meta-refresh to http://\[HTTP::host\]\[HTTP::uri\] in $::refresh_interval seconds
"
}
when HTTP_REQUEST {
if {[HTTP::path] starts_with "/meta"}{
log local0. "response string: [subst $::html_response_string]"
HTTP::respond 200 content [subst $::html_response_string]
} else {
HTTP::respond 200 content "\r\n200\tClient IP:port: [IP::client_addr]:[TCP::client_port]\
-> VIP IP:port: [IP::local_addr]:[TCP::local_port]\r\n"
}
}
[/code]
Aaron
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