News for hackers. Stuff that matters.
Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:50PM (#32573654)
This is essentially doing the same thing right? What is the advantage of this method? Less DNS changes?

(not trying to be snarky, trying to understand)

Re:Issues with upstream DNS provider by nightpool on Tuesday August 23, 2022 @08:54PM (#32573690)
The advantage is that you can do the CNAME swap atomically in the Cloudflare interface, instead of deleting a CNAME record and adding a new A record, which would lead to a few seconds when your DNS is entirely removed. Those few seconds may not sound like a lot, but they could be cached by Cloudflare or other external DNS resolvers, trigger "clean-up" functions within Cloudflare to remove resources associated with those domains, etc.

In our case, we have substantial logic running on the edge in Cloudflare Workers, as well as lots of other Cloudflare configuration options, and I don't even want to know what it could potentially do to our zone to remove the root DNS record that everything's tied to.

Re:Issues with upstream DNS provider by bombcar on Tuesday August 23, 2022 @11:01PM (#32574497)
Sounds like cloudflare could add an atomic cname -> a record feature.
Re:Issues with upstream DNS provider by fhte on Wednesday August 24, 2022 @12:30AM (#32575006)
Cloudflare should support RFC 2136 which includes atomic updates and is the standard for DNS updates.
Re:Issues with upstream DNS provider by nightpool on Wednesday August 24, 2022 @02:31PM (#32583767)
Honestly, I think this solution worked better than any dedicated feature could have, since it used the exact same existing codepaths that Cloudflare already had for CNAME flattening. Using CNAME records for self-documentation seems like a better practice anyway. Spending the time building a complicated new feature for such a rare case seems like a bad idea.
Re:Issues with upstream DNS provider by exitnode_ttl0 on Tuesday August 23, 2022 @08:58PM (#32573729)
Good points, thanks!
Re:Issues with upstream DNS provider by xofer on Tuesday August 23, 2022 @09:41PM (#32574036)
Deleting a record causes requests for that record to be negatively cached. The negative cache TTL[1] is often set to 1 day. So, deleting and immediately recreating a record can take your site offline for days. (Source: I made this mistake when changing a Route53 record for a subdomain that was getting about 70Krps. Luckily it was our source code making the requests, so we could change it, but that took an hours or so to roll out.)

[1]: https://www.rfc-editor.org/rfc/rfc2308

Re:Issues with upstream DNS provider by anayar on Tuesday August 23, 2022 @08:54PM (#32573687)
Nah bc you're not swapping from CNAME > A records, which could have other random networking related impacts, especially if you're running a public API.