27 Mar '12, 9am

nginxのキャッシュは5分にハードコードされていて、DNSのTTLに準拠するのはv1.1.9からとの事

I have recently come across several related issues which I have tracked down to nginx and the way it handles DNS. I run nginx as a proxy for several back end services. It works really well, except for 1 thing. My proxy_pass refers to an upstream which points to a DNS entry. That DNS entry is a CNAME with a TTL of 60 seconds. Nginx doesn't appear to be honoring that TTL. This has happened twice now. 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. When I searched for it, I found that nginx doesn't appear to honor TTLs, at all (http://www.ruby-forum.com/topic/2657341). What I'm hoping to find out, is why? Why does nginx cache DNS entries, instead of referring to the operating system? The OS has DNS handling built in. It respects TTLs, and...

Full article: http://www.ruby-forum.com/topic/2884119

Tweets