Nginx的client_header_buffer_size和large_client_header_buffers
? Nginx ?    2016-05-24 22:04:28    1128    0    0
holynull   ? Nginx ?
Syntax:client_header_buffer_size size;
Default:

client_header_buffer_size 1k;

Context:httpserver

Sets buffer size for reading client request header. For most requests, a buffer of 1K bytes is enough. However, if a request includes long cookies, or comes from a WAP client, it may not fit into 1K. If a request line or a request header field does not fit into this buffer then larger buffers, configured by the large_client_header_buffers directive, are allocated.

设置读取客户端请求头的缓存大小。大多数请求使用默认1kb已经足够了。然而,如果一个请求包含超长cookie,或者来自于wap客户端,那么1k缓存大小可能就不适用了。如果请求行或者请求头大小超过缓存大小,则使用large_client_header_buffers 设置的缓存来接收请求。


Syntax:large_client_header_buffers number size;
Default:

large_client_header_buffers 4 8k;

Context:httpserver

Sets the maximum number and size of buffers used for reading large client request header. A request line cannot exceed the size of one buffer, or the 414 (Request-URI Too Large) error is returned to the client. A request header field cannot exceed the size of one buffer as well, or the 400 (Bad Request) error is returned to the client. Buffers are allocated only on demand. By default, the buffer size is equal to 8K bytes. If after the end of request processing a connection is transitioned into the keep-alive state, these buffers are released.

最大缓存个数和每个缓存的大小,用来读取超大客户端请求头。一个请求行大小不能超过1个缓存的大小,否则将返回414给客户端。一个请求头的大小同样不能大于1个缓存的大小,否则将返回400错误给客户端。缓存是按需分配的。默认1个缓存大小为8k。在请求连接过度到keep-alive状态后,缓存将被释放。


参考http://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size

上一篇: Flume容错Avro sink示例

下一篇: 无

1128 人读过
立即登录, 发表评论.
没有帐号? 立即注册
0 条评论
文档导航