nginx performance using resolver

Nginx Lova lists at
Thu Feb 5 01:10:19 MSK 2009


I have nginx setup to create the upstream on the fly.

if ($request_uri ~* "^/(.*)/resource")
    set $user $1;
    proxy_pass   http://$$request_uri;

so here if the url is

nginx will send that to

I have setup bind on the same machine (with zone files) and have the
resolver set to;

Local digs (dig @ +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.

Posted via

More information about the nginx mailing list