When I include the upstream with the ip, the passing is instant, when I
don’t have the upstream which forces the use of the resolver it take
over 30 seconds.
Has anyone seen this behavior ? I didn’t find much info on the resolver
declaration.
Also how do I tell the resolver to use the systems resolver method ?
So I want nginx to use whatever the OS uses (dns entries in resolv.conf
or hardcoded ips in /etc/hosts.
When I include the upstream with the ip, the passing is instant, when I
don’t have the upstream which forces the use of the resolver it take
over 30 seconds.
resolver_timeout 2s;
Has anyone seen this behavior ? I didn’t find much info on the resolver
declaration.
Also how do I tell the resolver to use the systems resolver method ?
So I want nginx to use whatever the OS uses (dns entries in resolv.conf
or hardcoded ips in /etc/hosts.
Currently, you have to set up resolver address in configuraton.
Is there a way to enter 2 dns server to use for resolving ?
Trying to add some redundancy there. If not I would have to have a vip
which hits X number of name servers.
Thanks
Igor S. wrote:
On Thu, Feb 05, 2009 at 06:57:16PM +0100, Nginx L. wrote:
So this sets the resolver to timeout at a specific type of search ?
first it checks upstreams then dns , so does this set the timeout for
upstreams to 2s ? then the dns to 2s ?
No, first nginx looks up a host in upstream’s. There is no timeout.
If the host is not defined as upstream, then nginx tests it as IP
address.
If the host is not IP address, then nginx tries to resolve the host.
The timeout is used here while resolving.
On Thu, Feb 05, 2009 at 06:57:16PM +0100, Nginx L. wrote:
So this sets the resolver to timeout at a specific type of search ?
first it checks upstreams then dns , so does this set the timeout for
upstreams to 2s ? then the dns to 2s ?
No, first nginx looks up a host in upstream’s. There is no timeout.
If the host is not defined as upstream, then nginx tests it as IP
address.
If the host is not IP address, then nginx tries to resolve the host.
The timeout is used here while resolving.
On Sat, May 30, 2009 at 03:43:46AM +0200, Nginx L. wrote:
Hello Igor
Is there a way to enter 2 dns server to use for resolving ?
Trying to add some redundancy there. If not I would have to have a vip
which hits X number of name servers.
On Mon, Sep 28, 2009 at 06:05:39AM -0400, midenok wrote:
Why there is no possibility to use system resolver? Or there is?
For resolving names at configuration stage nginx uses system
resolver. It isn’t possible to use system resolver during request
processing though, as system resolvers are usually blocking.
Maxim D.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.