Our nginx is configured to serve requests from 2 upstreams: php-fpm
and memcached
.
When request is served from php-fpm
, $upstream_response_time
has non-zero value.
When request is served from memcached
, $upstream_response_time
sometimes has zero value, not for every request.
Looking at logs, I can't determinate any patterns, don't observe any regularity. Http versions, urls and so on, differ.
For instance, see attached table from kibana, filleted by specific url:
Time upstream_response_time request_time status request page_from_memcached
September 28th 2018, 15:26:04.000 0 0.052 200 GET /myra/bags/ HTTP/1.1 1
September 28th 2018, 15:13:22.000 0.001 0.001 200 GET /myra/ HTTP/1.1 1
September 28th 2018, 14:50:55.000 0.066 0.066 200 GET /myra/ HTTP/2.0 1
September 28th 2018, 14:31:57.000 0 0 200 GET /myra/ HTTP/1.1 1
September 28th 2018, 14:16:05.000 0 0 200 GET /myra/ HTTP/1.1 1
As you can see, $upstream_response_time
logged as zero, in some messages.