Resolver not re-resolving new ip address of an AW ELB

Ruslan Ermilov ru at nginx.com
Thu Nov 2 10:04:48 UTC 2017


On Tue, Oct 31, 2017 at 01:26:45PM -0400, RKGood wrote:
> Thank you for your replies. I think we have found the root cause. We have
> found below:
> 
> When you are using variables in a proxy_pass directive, nginx will use
> runtime resolving except if :
>     the target server is declared as an IP address

There's nothing to resolve if it's an address.

>     the target server name is part of an upstream server group

Not part, but the upstream group name.  This is documented in the
http://nginx.org/r/proxy_pass directive as follows:

: Parameter value can contain variables. In this case, if an address
: is specified as a domain name, the name is searched among the
: described server groups, and, if not found, is determined using
: a resolver. 

>     the target server name has already been resolved (e.g. it matches a
> server name in another server block)

nginx has its own resolver cache.  By default, nginx uses DNS TTL.
If that's not desirable for some reasons, you can control the validity
of cached entries by using the "valid" parameter of the "resolver"
directive, please see http://nginx.org/r/resolver for details.


More information about the nginx mailing list