upstream url

Michael Monashev postmaster at softsearch.ru
Tue Jul 20 00:48:13 MSD 2010


Hi, Igor.

Can you add this patch for some 3rd party balancers, that use upstream
url. For example: ketama-like algorithms.

--- src/http/ngx_http_upstream.c
+++ src/http/ngx_http_upstream.c
@@ -4080,6 +4080,7 @@ ngx_http_upstream_server(ngx_conf_t *cf,
         goto invalid;
     }
 
+    us->name = u.url;
     us->addrs = u.addrs;
     us->naddrs = u.naddrs;
     us->weight = weight;
--- src/http/ngx_http_upstream.h
+++ src/http/ngx_http_upstream.h
@@ -80,6 +80,7 @@ typedef struct {
 
 
 typedef struct {
+    ngx_str_t                        name;
     ngx_addr_t                      *addrs;
     ngx_uint_t                       naddrs;
     ngx_uint_t                       weight;

-- 
Michael




More information about the nginx-devel mailing list