Upstream: the "zone" directive.

Upstreams with the "zone" directive are kept in shared memory,
with a consistent view of all worker processes.
This commit is contained in:
Ruslan Ermilov
2015-04-14 19:01:25 +03:00
parent b0b7b5a356
commit cf31347ee8
10 changed files with 407 additions and 7 deletions

View File

@@ -391,6 +391,12 @@ if [ $HTTP_UPSTREAM_KEEPALIVE = YES ]; then
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_KEEPALIVE_SRCS"
fi
if [ $HTTP_UPSTREAM_ZONE = YES ]; then
have=NGX_HTTP_UPSTREAM_ZONE . auto/have
HTTP_MODULES="$HTTP_MODULES $HTTP_UPSTREAM_ZONE_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_ZONE_SRCS"
fi
if [ $HTTP_STUB_STATUS = YES ]; then
have=NGX_STAT_STUB . auto/have
HTTP_MODULES="$HTTP_MODULES ngx_http_stub_status_module"

View File

@@ -103,6 +103,7 @@ HTTP_UPSTREAM_HASH=YES
HTTP_UPSTREAM_IP_HASH=YES
HTTP_UPSTREAM_LEAST_CONN=YES
HTTP_UPSTREAM_KEEPALIVE=YES
HTTP_UPSTREAM_ZONE=YES
# STUB
HTTP_STUB_STATUS=NO
@@ -256,6 +257,7 @@ use the \"--without-http_limit_conn_module\" option instead"
--without-http_upstream_least_conn_module)
HTTP_UPSTREAM_LEAST_CONN=NO ;;
--without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
--without-http_upstream_zone_module) HTTP_UPSTREAM_ZONE=NO ;;
--with-http_perl_module) HTTP_PERL=YES ;;
--with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
@@ -406,6 +408,8 @@ cat << END
disable ngx_http_upstream_least_conn_module
--without-http_upstream_keepalive_module
disable ngx_http_upstream_keepalive_module
--without-http_upstream_zone_module
disable ngx_http_upstream_zone_module
--with-http_perl_module enable ngx_http_perl_module
--with-perl_modules_path=PATH set Perl modules path

View File

@@ -513,6 +513,11 @@ HTTP_UPSTREAM_KEEPALIVE_SRCS=" \
src/http/modules/ngx_http_upstream_keepalive_module.c"
HTTP_UPSTREAM_ZONE_MODULE=ngx_http_upstream_zone_module
HTTP_UPSTREAM_ZONE_SRCS=" \
src/http/modules/ngx_http_upstream_zone_module.c"
MAIL_INCS="src/mail"
MAIL_DEPS="src/mail/ngx_mail.h"