resolver directive doesn't fallback to the system DNS resolver

Yichun Zhang (agentzh) agentzh at gmail.com
Mon Jan 12 22:19:08 UTC 2015


Hello!

On Mon, Jan 12, 2015 at 1:48 PM, Kunal Pariani wrote:
> Is there already a patch for this ?

AFAIK, the Tengine fork has a patch for this.

> I am not completely sure of how to make the nginx resolver (in ngx_resolver.c) fallback to libresolv automatically and if this not trivial enough, i just might read the resolvers from /etc/resolv.conf and provide it to the 'resolver' directive. Any suggestions ?
>

I was not talking about falling back to libresolv because it is very
likely to block the nginx event loop or introduce extra OS threads for
no good. I was talking about extracing nameserver addresses
automatically from /etc/resolv.conf (or similar places in other exotic
operating systems) and feed them into nginx's current nonblocking
resolver.

And yes, for now, the latter workaround should be the simplest for you :)

Regards,
-agentzh



More information about the nginx mailing list