nginx配置备忘

发布时间:2018-08-15 10:32:33
Linux 

$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

服务端从客户端读取到第一个字节,直到发送最后一个字节到客户端所需要的时间,单位是秒,精度是毫秒。

$upstream_response_time

keeps time spent on receiving the response from the upstream server; the time is kept in seconds with millisecond resolution. Times of several responses are separated by commas and colons like addresses in the $upstream_addr variable.

从upstream server接收响应所需要的时间

Syntax:	upstream name { ... }
Default:	—
Context:	http

Defines a group of servers. Servers can listen on different ports. In addition, servers listening on TCP and UNIX-domain sockets can be mixed.

定义一组Servers,Servers可以监听不同的端口。此外,Servers可以混合监听TCP和Unix域sockets。

Syntax:	keepalive connections;
Default:	—
Context:	upstream
This directive appeared in version 1.1.4.

Activates the cache for connections to upstream servers.

缓存对upstream servers的连接

The connections parameter sets the maximum number of idle keepalive connections to upstream servers that are preserved in the cache of each worker process. When this number is exceeded, the least recently used connections are closed.

参数connections设置了空闲keepalive连接的最大数量,在每一个worker进程中。当超过这个数量后,最近使用的连接将会被关闭。

参考

原文地址:http://zhyoulun.com/post/nginx-config-memo
转载请注明出处