Forum Discussion
Dario_19875
Nimbostratus
May 11, 2010LC no longer supporting HTTP fallback
Hi all,
I have a deployment of 2 Link Controllers v10.1.0 at a customer, which will replace the customer's current LCs v4.5.14.
In his current LCs, we had the possibility to define a 'fallback host' in case no pool members were active. A HTTP redirect was send that points to a page saying the website is down for maintenance.
In the new version, this feature is apparently no longer available.
After searching ask.f5, we found an iRule using HTTP_REQUEST and HTTP::redirect, but get an error stating 'ltm_rule_L7 feature not licensed'.
Do you have any idea how we can accomplish this? Or is buying an LTM license only for this the only valid solution?
Thanks in advance.
Br,
Dario
10 Replies
- hoolio
Cirrostratus
Hi Dario,
I don't think there is a way in a LC-only license for v9/10 to do this.
Aaron - Dario_19875
Nimbostratus
Hi,
I've found an iRule that could work, but at the moment it isn't working 100%:
when CLIENT_ACCEPTED {
if { [active_members POOL_NAME] < 1 } {
TCP::respond "HTTP/1.1 302 Redirect\r\nLocation: http://URL/\r\nConnection: Close\r\n\r\n"
}
}
The weird thing is, when testing using Chrome as internet browser, my request is redirected and everything is working fine.
When doing the same thing with IE or Firefox, an error occurs.
IE just gives me the page that a connection error has occured, Firefox gives me a Connection Interrupted: The document contains no data.
When changing the 302 to 301, again Chrome works fine, IE also works fine but still Firefox gives me the same error.
When sniffing, I see the same HTTP redirect being send, so I assume it is browser related.
Anyone had this problem before or can explain where it goes wrong?
Anyone can point me in the correct direction?
Can I adopt my iRule to get this to work?
Thanks in advance!
Dario - Hamish
Cirrocumulus
At a quick guess, I'd surmise that the browsers don't like an HTTP response coming back before they've made their request..
(CLIENT_ACCEPTED fires as soon as the connection is made, and (Depending on load) will probably fire well before the client has a chance to send the request)...
H - Dario_19875
Nimbostratus
Hi,
I've checked the traces, and see that the HTTP GET is first done. In response to that, the 302 redirect is send.
Any idea by which is can replace CLIENT_ACCEPTED?
Thanks,
Dario - Cspillane_18296
Nimbostratus
Hi Dario,
does using "when HTTP_REQUEST" as the iRule Event give you any better result? I'm afraid I don't have time to test this but I fear it might still not work, it may depend on the Virtual Server type (see SOL8082). However if you have the time a quick test will show one way or the other.
Good luck! - Hamish
Cirrocumulus
I believe that was covered in the first post... Those events don't appear to be available in the version he's running with an LC only license...
H - Cspillane_18296
Nimbostratus
Silly me, you're quite right Hamish! I'll go hide somewhere in shame... - Dario_19875
Nimbostratus
Hi,
found a solution which works:
CLIENT_ACCEPTED {
if { [active_members POOL_NAME] < 1 } {
TCP::respond "HTTP/1.1 302 Found\r\nServer: webserver\r\nLocation: http://URL\r\nAccept-Ranges: none\r\nConnection: close\r\nContent-Length: 0\r\n\r\n\r\n"
TCP::close
}
}
}
Thanks all for the replies.
Dario - Hamish
Cirrocumulus
Posted By Cspillane on 05/20/2010 07:35 AM
Silly me, you're quite right Hamish! I'll go hide somewhere in shame...
I think I've made worse... - Hamish
Cirrocumulus
Posted By Dario on 05/20/2010 07:37 AM
Hi,
found a solution which works:
CLIENT_ACCEPTED {
if { [active_members POOL_NAME] < 1 } {
TCP::respond "HTTP/1.1 302 Found\r\nServer: webserver\r\nLocation: http://URL\r\nAccept-Ranges: none\r\nConnection: close\r\nContent-Length: 0\r\n\r\n\r\n"
TCP::close
}
}
}
Thanks all for the replies.
Dario
Ahh.... It's possible that firefox is waiting for content... Because your original response had a header, and then nothing for response body... Now you're sending a CL header of 0, and an extra EOL... I wonder if it's the extra EOL or the CL header that firefox really wanted...
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