monitor upstream IP addr changes without using nginx's resolver

Kunal Pariani kpariani at
Fri Jan 16 19:17:23 UTC 2015

Sorry am new to Lua but can you plz explain how this upstream status & control will help with this issue. How can i query for the upstream ip after every certain time interval and reconfigure nginx if there's a change detected ? 
The reason for not using nginx's resolver here is that i have to parse the resolv.conf to get the nameservers which is not a clean solution as there are still some linux distros that don't use /etc/resolv.conf. This should be OS & implementation independent. How to make this work everywhere ? 


From: "itpp2012" <nginx-forum at> 
To: nginx at 
Sent: Tuesday, January 13, 2015 1:58:32 AM 
Subject: Re: resolver directive doesn't fallback to the system DNS resolver 

kunalvjti Wrote: 
> Is there already 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 

Have a look at a Lua solution, not everything works yet, 
patches/ideas/feedback welcome :) 

Posted at Nginx Forum:,255961,256081#msg-256081 

nginx mailing list 
nginx at 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list