Forum Discussion
Sorry Page for VS without HTTP profile
I need to implement Sorry Page solution on our LTM. The sorry page should be shown to the user if all node members of particular VS are down.
I have a VS listening on IP:443 and I am doing only a simple load balancing, there is no SSL, nor HTTP profile attached to the VS.
I cannot use following iRule, because my VS does not have any HTTP/SSL profile attached, so it does not decrypt the SSL data, hence cannot respond with HTTP::respond:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 200 content [ifile get iFile_name]
}
}
Also I cannot use following iRule because I don't want to host the sorry page on backend server.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::redirect "http://www.google.com"
}
}
The best would be to manage the sorry page directly from the F5, for example via the iFile.
What would be the ideal solution my this case?
4 Replies
You're pretty much stuck with using something unique unless you're willing to add the HTTP and SSL profiles.
The easy solution would be to have a dedicated pool to service the sorry pages. You can't do redirects or mess with the unencrypted headers unless you apply those other profiles..
when CLIENT_ACCEPTED { if { [active_members [LB::server pool]] == 0} { if { [TCP::local_port clientside] eq "443" } { pool sorry_https_pool } else { pool sorry_http_pool } } }Probably worth noting that this since you're not terminating SSL, you would need to have one pool for HTTP and one for HTTPS.
- correction to that rule. [TCP::local_port] rather than [TCP::local_port clientside].
- Martin_Vlasko
Altocumulus
My virtual server listens only to port 443, so I assume I don't need to care about HTTP. But the suggestion below from THi looks promising, I will give it a try.
- THi
Nimbostratus
Just an idea: In some cases one can use another virtual server to produce the Sorry Page with proper iRule HTTP::respond, iFile etc syntax (and with http and client ssl profiles). Basically creating a Sorry Page server within the BIG-IP.
Then instead of using pool command, use node command in the iRule (above) targeting to this new s.c. Layered Virtual when all pool members are down. In this fashion the Sorry Page layered virtual could be more generic and be used for multiple purposes. One can even parametrize it to create more dynamic sorry page for example by adding dynamic info in the headers.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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