In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Scenario: the backend of Nginx is followed by Tomcat. Now you need to count the processing time of implementing Nginx and the return time of backend server.
Purpose: for a client request, use the log to output the processing time of Nginx itself and the processing time of the upstream server.
Implementation: obtain the relevant information through the upstream_response_time variable of the upstream module.
Configuration:
1. Define logformat log_format timed_combined'$remote_addr-$remote_user [$time_local]'"$request" $status $body_bytes_sent'', $http_referer "$http_user_agent"'$request_time $upstream_response_time $pipe'
Request_time indicates how long it will take for Nginx to process the request. Upstream_response_time indicates the processing time of the upstream server. Pipe indicates whether http pipe is used
Use the log format:
Access_log / var/log/nginx/yourdomain.com.access.log timed_combined
66.249.71.173-[08/Nov/2010:14:16:18-0600] "GET / blog/2010/apr/30/installing-geodjango-dependencies-homebrew/ HTTP/1.1" 6569 "-" Mozilla/5.0 (compatible; Googlebot/2.1; + http://www.google.com/bot.html)" 0.640 0.640.
0.640 indicates that Nginx takes 0.640s to go to the corresponding client, in which the upstream server takes up 0.640s and does not spend any time, and does not use pipeline
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.