view config @ 11:15530a464dba

Keepalive: don't cache invalid connections. 1. Remember failed status, since peer.free() may be called more than once. It's called twice if peer fails - once from ngx_http_upstream_next() with NGX_PEER_FAILED set, and then from ngx_http_upstream_finalize_request() without. 2. We shouldn't cache connection unless we aren't expecting anything from upstream. For memcached this means either 404 response or 200 response with all body read (body may not be read e.g. when serving HEAD request).
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 13 Nov 2008 19:36:23 +0300
parents 725ee11164f3
children
line wrap: on
line source

ngx_addon_name="ngx_http_upstream_keepalive_module"

HTTP_MODULES="$HTTP_MODULES \
	ngx_http_upstream_keepalive_module"

NGX_ADDON_SRCS="$NGX_ADDON_SRCS \
	$ngx_addon_dir/ngx_http_upstream_keepalive_module.c"