Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2018-06-15 11:46:14 +0300
committerVladimir Homutov <vl@nginx.com>2018-06-15 11:46:14 +0300
commit0c4ccbea23813a50132df511d4445bc1686dbc2f (patch)
tree953fbddab43d9e5d8a06e2d8f1e61d1e006a21dd /auto/modules
parent2eab9efbe4050ab471cfa3ed778d751454fcd87d (diff)
Upstream: ngx_http_upstream_random module.
The module implements random load-balancing algorithm with optional second choice. In the latter case, the best of two servers is chosen, accounting number of connections and server weight. Example: upstream u { random [two [least_conn]]; server 127.0.0.1:8080; server 127.0.0.1:8081; server 127.0.0.1:8082; server 127.0.0.1:8083; }
Diffstat (limited to 'auto/modules')
-rw-r--r--auto/modules21
1 files changed, 21 insertions, 0 deletions
diff --git a/auto/modules b/auto/modules
index 73a9bae9b..09bfcb08d 100644
--- a/auto/modules
+++ b/auto/modules
@@ -878,6 +878,17 @@ if [ $HTTP = YES ]; then
. auto/module
fi
+ if [ $HTTP_UPSTREAM_RANDOM = YES ]; then
+ ngx_module_name=ngx_http_upstream_random_module
+ ngx_module_incs=
+ ngx_module_deps=
+ ngx_module_srcs=src/http/modules/ngx_http_upstream_random_module.c
+ ngx_module_libs=
+ ngx_module_link=$HTTP_UPSTREAM_RANDOM
+
+ . auto/module
+ fi
+
if [ $HTTP_UPSTREAM_KEEPALIVE = YES ]; then
ngx_module_name=ngx_http_upstream_keepalive_module
ngx_module_incs=
@@ -1143,6 +1154,16 @@ if [ $STREAM != NO ]; then
. auto/module
fi
+ if [ $STREAM_UPSTREAM_RANDOM = YES ]; then
+ ngx_module_name=ngx_stream_upstream_random_module
+ ngx_module_deps=
+ ngx_module_srcs=src/stream/ngx_stream_upstream_random_module.c
+ ngx_module_libs=
+ ngx_module_link=$STREAM_UPSTREAM_RANDOM
+
+ . auto/module
+ fi
+
if [ $STREAM_UPSTREAM_ZONE = YES ]; then
have=NGX_STREAM_UPSTREAM_ZONE . auto/have