Hacker News new | ask | show | jobs
by Tenzer 3974 days ago
I think the reasoning for it is for performance. If you can make all the DNS queries you need before you start serving any requests, then you don't have to wait for DNS servers while clients hammer your server.

Ideally I would have like it to be an option though, instead of it basically having become a feature in Nginx Plus - if it wasn't for the way I described in the post.

2 comments

I think there's room for interpretation but that in cases like this, it is indeed a bug.

Many applications are programmed this way but I firmly believe that an application needs to honor the TTL of a DNS request for any subsequent connections, for exactly this reason. DNS records change. Sometimes frequently. IMO you shouldn't need yo kick your apps to get them to use the new hostname for subsequent connections.

It should just schedule a DNS update before the previous one has expired, and if the addresses have changed shift over, so it should not cause any delays.
I would expect that to be the way the Nginx Plus implementation works, but I have never had a chance to try it out.