]> git.kaiwu.me - nginx.git/commit
Resolver: per-request DNS server balancer.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 28 Jan 2016 12:28:20 +0000 (15:28 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 28 Jan 2016 12:28:20 +0000 (15:28 +0300)
commitc8c44f74783d699474b32a59f525a3ef4dfbecf5
tree865930ecccbf3fdd22f9d698fbf579ea37096dbb
parent1945fff7bfee1eef23933faa0ccfbe05445dcfe1
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.
src/core/ngx_resolver.c
src/core/ngx_resolver.h