Forum Discussion
mario_112401
Nimbostratus
May 30, 2008HTTP response timeout
Hello, when an HTTP_REQ arrives, LTM should send the request to one server in the pool and wait for 1 sec for the server's answer: if TO expires, LTM should send a specific answer to the client and dr...
hoolio
Cirrostratus
Jun 03, 2008Mario,
Here's a first attempt (untested):
when HTTP_REQUEST {
Save the start time when HTTP request headers were parsed
set start_time [clock clicks -milliseconds]
}
when HTTP_RESPONSE {
Check if the response headers from the server were parsed in more than 1000ms
if {[expr {[clock clicks -milliseconds] - $start}] > 1000}{
Respond back to client
HTTP::respond 200 content "Response time was too long"
}
}
The default pool on the VIP will be used. If you want to add pool selection logic to the rule, you can do it in the HTTP_REQUEST event.
Aaron
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