Forum Discussion
DB
Aug 10, 2020Nimbostratus
Add Network Latency measurement to output of iRule Apology page?
I have a simple Apology page being presented by an iRule using "content" such as: HTTP::respond 200 content { <html> .... </html> } Is there any mechanism I can use to include as output o...
Simon_Blakely
Aug 10, 2020Employee
You could capture a timestamp from CLIENT_ACCEPTED, and then record the time for HTTP_REQUEST, and present that.
You would effectively be measuring the RTT of an ACK back to the client, and then the Browser sending the first request.
Something like:
when CLIENT_ACCEPTED {
set conntime [clock milliseconds]
}
when HTTP_REQUEST {
set reqtime [clock milliseconds]
set client_latency (reqtime - conntime)
HTTP::respond 200 content { \
<html> \
... \
time to respond is $client_latency \
.... \
</html> }
}
when HTTP_RESPONSE {
set resptime [clock milliseconds]
set server_latency (resptime - reqtime)
}
when HTTP_RESPONSE_RELEASE {
# reset conntime to track client latency
set conntime [clock milliseconds]
}
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