<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Noah,<div><br></div><div>Right, thanks for your observation. It really took a while, but we're actually about to fix this one shortly.</div><div><br><div><div>On Oct 28, 2011, at 5:16 PM, Noah Cantor wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I have recently come across several related issues which I have tracked down to nginx and the way it handles DNS.<div>I run nginx as a proxy for several back end services. It works really well, except for 1 thing. </div><div>
My proxy_pass refers to an upstream which points to a DNS entry.</div><div>That DNS entry is a CNAME with a TTL of 60 seconds.</div><div>Nginx doesn't appear to be honoring that TTL. This has happened twice now.</div>
<div>My upstream DNS information has changed, pointing to a new IP address. Instead of recovering withing 1 minute (which would happen if TTLs were being honored), I have had to restart nginx.</div><div>When I searched for it, I found that nginx doesn't appear to honor TTLs, at all (<a href="http://www.ruby-forum.com/topic/2657341">http://www.ruby-forum.com/topic/2657341</a>).</div>
<div><br></div><div>What I'm hoping to find out, is why?</div><div>Why does nginx cache DNS entries, instead of referring to the operating system? The OS has DNS handling built in. It respects TTLs, and it works perfectly. Nginx, on the other hand, is effectively broken as a load balancer, since upstreams might change IP addresses at any time (which is why we're using DNS names, instead of IP addresses.</div>
<div><br></div><div>Thanks,</div><div>Noah</div>
_______________________________________________<br>nginx mailing list<br><a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>http://mailman.nginx.org/mailman/listinfo/nginx</blockquote></div><br></div></body></html>