nginx performance using resolver
is at rambler-co.ru
Thu Feb 5 09:53:32 MSK 2009
On Wed, Feb 04, 2009 at 11:10:19PM +0100, Nginx Lova wrote:
> I have nginx setup to create the upstream on the fly.
> if ($request_uri ~* "^/(.*)/resource")
> set $user $1;
> proxy_pass http://$user.resource.domain.com:7600$request_uri;
> so here if the url is
> nginx will send that to nginx.resource.domain.com:7600
> I have setup bind on the same machine (with zone files) and have the
> resolver set to 127.0.0.1;
> Local digs (dig @127.0.0.1 nginx.resource.domain.com +short) take ms.
> 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
> 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.
More information about the nginx