-
Notifications
You must be signed in to change notification settings - Fork 0
Update latency timing headers #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bf03204 to
747e9ab
Compare
747e9ab to
178b45e
Compare
CHANGELOG.md
Outdated
| * Remove `X-Proxy-Backend-Total-Time`. | ||
| * Update logging fields: | ||
| * Remove `http_x_proxy_backend_total_time`. | ||
| * Remove `http_x_proxy_backend_response_time`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to have removed http_x_proxy_backend_response_time from logging fields 🤔 , here.
Secondly would we not want to keep the logging and http configuration consistent?
Meaning adding http_x_proxy_request_time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to have removed
http_x_proxy_backend_response_timefrom logging fields 🤔 , here.
Right, fixed in 977c88b.
Secondly would we not want to keep the logging and http configuration consistent? Meaning adding
http_x_proxy_request_time.
Turns out we already do ...
docker-nginx-proxy/config/log.conf
Lines 26 to 28 in facd8e7
| '"request":"$request",' | |
| '"request_length":"$request_length",' | |
| '"request_time":"$request_time",' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks noted.
Nginx provides a number of built‑in timing variables that we can use to investigate latency. All are measured in seconds with millisecond resolution. These are:
$request_time– Full request time, starting when Nginx reads the first byte from the client and ending when Nginx sends the last byte of the response body.$upstream_connect_time– Time spent establishing a connection with an upstream server.$upstream_header_time– Time between establishing a connection to an upstream server and receiving the first byte of the response header.$upstream_response_time– Time between establishing a connection to an upstream server and receiving the last byte of the response body.Another way to put it ...
$upstream_connect_time$upstream_header_time$upstream_response_timeTesting
Build and run it ...
Hit the endpoint and check out the headers ...
Or you can check the logs ...
Related
References