$ Request_time and $ upstream_response_time monitoring of nginx

Source: Internet
Author: User
Preface today, the teacher gave me a task on trello, that is, to modify the nginx log format and monitor nginx. Therefore, I have come into contact with two common nginx parameters, here we record $ request_time & $ upstream_response_time. First, Let's explain the two parameters.
  • $ Request_time: the time when nginx processes the request.
  • $ Upstream_response_time: PHP-CGI Response Time
Log format test code
<? Phpsleep (5); echo "Hello world! <Br> ";?>


We can use the code to analyze logs and sort the logs by $ request_time and $ upstream_response_time to obtain the most time-consuming requests. This improves the code and improves the user experience!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.