diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2016-01-28 15:28:20 +0300 |
|---|---|---|
| committer | Roman Arutyunyan <arut@nginx.com> | 2016-01-28 15:28:20 +0300 |
| commit | c8c44f74783d699474b32a59f525a3ef4dfbecf5 (patch) | |
| tree | 865930ecccbf3fdd22f9d698fbf579ea37096dbb /src/core/ngx_resolver.h | |
| parent | 1945fff7bfee1eef23933faa0ccfbe05445dcfe1 (diff) | |
| download | nginx-c8c44f74783d699474b32a59f525a3ef4dfbecf5.tar.gz nginx-c8c44f74783d699474b32a59f525a3ef4dfbecf5.tar.bz2 | |
Resolver: per-request DNS server balancer.
Previously, a global server balancer was used to assign the next DNS server to
send a query to. That could lead to a non-uniform distribution of servers per
request. A request could be assigned to the same dead server several times in a
row and wait longer for a valid server or even time out without being processed.
Now each query is sent to all servers sequentially in a circle until a
response is received or timeout expires. Initial server for each request is
still globally balanced.
Diffstat (limited to 'src/core/ngx_resolver.h')
| -rw-r--r-- | src/core/ngx_resolver.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/ngx_resolver.h b/src/core/ngx_resolver.h index 5aedabfaa..ab4ae74ee 100644 --- a/src/core/ngx_resolver.h +++ b/src/core/ngx_resolver.h @@ -93,6 +93,8 @@ typedef struct { time_t valid; uint32_t ttl; + ngx_uint_t last_connection; + ngx_resolver_ctx_t *waiting; } ngx_resolver_node_t; |
