1、request_time

官网描述:request processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read from the client and the log write after the last bytes were sent to the client 。
指的就是从接受用户请求的第一个字节到发送完响应数据的时间,即包括接收请求数据时间、程序响应时间、输出
响应数据时间。

2、upstream_response_time

官网描述:keeps times of responses obtained from upstream servers; times are kept in seconds with a milliseconds resolution. Several response times are separated by commas and colons like addresses in the $upstream_addr variable

是指从Nginx向后端(php-cgi)建立连接开始到接受完数据然后关闭连接为止的时间。

从上面的描述可以看出,$request_time肯定比$upstream_response_time值大,特别是使用POST方式传递参数时,因为Nginx会把request body缓存住,接受完毕后才会把数据一起发给后端。所以如果用户网络较差,或者传递数据较大时,$request_time会比$upstream_response_time大很多。

所以如果使用nginx的accesslog查看php程序中哪些接口比较慢的话,记得在log_format中加入$upstream_response_time。

最新文章

  1. LVM基本介绍与常用命令
  2. SharePoint 2013功能(SPFeature)与GUID对照表
  3. Linux 脚本编写基础
  4. 今天做项目用到框架,关于angual,然后自己整理了一番,自己上网也看了看。
  5. Mac下Android Studio中获取SHA1和MD5
  6. css中的zoom的使用
  7. Unity3d之Http通讯GET方法和POST方法
  8. Android使用listView,BaseAdapter实现列表页
  9. Angular form
  10. hdu2159二维费用背包
  11. 推荐两款Windows管理工具
  12. Java 强引用 软引用 弱引用 虚引用详解
  13. 201521123014 《Java程序设计》第5周学习总结
  14. pwnable.kr-leg-witeup
  15. 转:酷我音乐API
  16. PPT设计灵感功能
  17. 前端通信:ajax设计方案(十)--- 完善Promise A+规范,增加mock数据功能
  18. B - Internship (网络流关键割边)
  19. python - class类 (一)
  20. 关于Unity中NGUI的Checkbox复选框、Slider滑动条和Button的6种触发回调事件的方式

热门文章

  1. Betsy Ross Problem
  2. 浅谈 vue实例 和 vue组件
  3. Hive性能优化--map数和reduce数
  4. LintCode 58: Compare Strings
  5. 【leetcode 简单】 第八十八题 猜数字大小
  6. www.sojson.com网站高级JS加密破解
  7. 15、BigDecimal类简介
  8. 基于Django-Cookie的CBV和FBV的用户验证装饰器
  9. prim算法记录路径
  10. transform 动画效果