News for hackers. Stuff that matters.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by seiferteric on Thursday August 27, 2026 @02:31PM (#49469204)
You have to cache, cloudflare doesn't know all the records ahead of time, they have to do recursive lookups to the authoritative servers that own the records and that is only good for the period of the TTL of the record. There is no "global" DNS record database or something like that.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by pbhjpbhj on Thursday August 27, 2026 @03:14PM (#49469807)
>that is only good for the period of the TTL of the record.

Not really, TTLs are often short, but IPs might not change for years.

You can probably generate your own TTL, at scale, and avoid many DNS requests.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by fc417fc802 on Thursday August 27, 2026 @03:54PM (#49470326)
Why would anyone want to use a DNS resolver that tampered with records on a large scale? The TTL is intentionally set by the originator of the record.

Or alternatively, if you don't tamper why would I want to use a service that serves stale data?

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by robotresearcher on Thursday August 27, 2026 @04:26PM (#49470733)
Every distributed system serves stale data.

You can define away ‘stale’ by picking a consistency model, but look inside the consistency machinery and you will see fresher data you aren’t allowed to have yet.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by fc417fc802 on Friday August 28, 2026 @01:01AM (#49474537)
That's like refusing to use a fridge, insisting on letting your produce gradually spoil on the counter because "all harvested produce is in a state of decay anyway".
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by robotresearcher on Friday August 28, 2026 @12:34PM (#49480988)
No, it's using a fridge in the understanding of the fundamental limitations of fridges.

You asked ‘why would I want to use a service that serves stale data’. The answer is you don’t want to. But if you have a distributed system your only choices are about the nature of the possible staleness, since global instantaneous consistency is known to be impossible due to fundamental features of the universe.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by fc417fc802 on Friday August 28, 2026 @03:31PM (#49483206)
In that case you're (intentionally?) misinterpreting what I originally said. The person I replied to was metaphorically suggesting turning the temperature dial on the fridge way up and I metaphorically asked why I would want to eat at his house if he's going to be serving me spoiled food.

My original question could also be described as asking why I would choose to shop at a grocer where items on the shelf are routinely far past the printed expiry date. That's perhaps a more direct analogy.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by robotresearcher on Friday August 28, 2026 @05:07PM (#49484271)
Your additional explanation does help clarify your meaning.

Serving up records with TTLs in the past is so deeply weird that I didn't even consider that was what the grandparent had in mind.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by otterley on Thursday August 27, 2026 @03:39PM (#49470124)
In DNS, the owner of each record has full control over its TTL. Intermediary DNS servers are required to honor them and are not permitted to replace TTLs with their own.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by dizhn on Thursday August 27, 2026 @03:54PM (#49470330)
DNS servers do in fact do that but it would not be a good look for the world's largest DNS provider.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by inigyou on Thursday August 27, 2026 @10:35PM (#49473709)
I don't think cloudflare cares about how it looks, also I think Google is bigger.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by ButlerianJihad on Thursday August 27, 2026 @03:49PM (#49470257)
Actually that is not true. The IETF has expanded the definition of “TTL” and explicitly permits resolvers to serve “stale” RRs beyond their expiration time.

https://www.rfc-editor.org/info/rfc8767/

As a corollary, there is obviously no floor on refetching unexpired RRs, of course, except for efficiency concerns.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by seiferteric on Thursday August 27, 2026 @03:52PM (#49470297)
That's only when the authoritative server cant be reached though
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by pbhjpbhj on Thursday August 27, 2026 @03:52PM (#49470290)
You are obliged to pass on the TTL, you're not obliged to cache according to it.

At least in my country (UK) I know of no law relating to DNS caching.

Why throwaway perfectly good data every few minutes that is only modified every couple of years, just so someone can move their domain quickly when they eventually wish to? It is my contention that a [caching] DNS service can do far better. Trusting user (domain owner) input blindly is not for me.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by otterley on Thursday August 27, 2026 @04:01PM (#49470406)
It's not some sort of public law with public enforcement, but it is in the RFCs that govern the protocol.

I should be a bit clearer here; the TTL is an upper bound on how long it can be cached. Caches are free to consult more frequently but not less frequently. That said, out of respect for upstream cache operators and authoritative servers, most DNS caches honor TTLs as best they can.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by inigyou on Thursday August 27, 2026 @10:36PM (#49473714)
The IETF isn't the internet police. You don't have to follow its advice.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by otterley on Friday August 28, 2026 @12:10AM (#49474266)
No, but if you didn’t, the internet wouldn’t really work all that well. It was the fact that participants, despite being independent, all agreed (either explicitly or implicitly) to adhere to the standards that it became a global network. If they hadn’t, the result would have been more of the same: independent networks that only had narrow interoperability at best.

Advocating to do things against agreed-upon standards without a compelling reason and without giving due consideration to the adverse consequences is one of the hallmarks of a bad engineer. Even Microsoft played nice with Internet standards for the most part (although with some notable exceptions at the application layer that got them well-deserved criticism).

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by inigyou on Friday August 28, 2026 @12:13AM (#49474274)
It was the fact that adhering to the standard was in the best interest of each participant. When it isn't, they don't.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by otterley on Friday August 28, 2026 @12:22AM (#49474341)
It's impossible to know how often participants chose to stick to the standards anyway despite it not being in their best interest. Do you have any specific examples?
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by inigyou on Friday August 28, 2026 @01:10AM (#49474579)
Linux routers responding ICMP from 192.0.0.8 when not having an IP address (currently being standardized). Clouds using class E address space (240.0.0.0-255.255.255.254). Routers that drop IP packets with options. The entire concept of NAT until the existing behavior was eventually standardized. Unnumbered interfaces.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by fc417fc802 on Friday August 28, 2026 @05:46PM (#49484614)
I think all of those are examples of "[doing] things against agreed-upon standards [with] a compelling reason and [with] due consideration to the adverse consequences".
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by inigyou on Saturday August 29, 2026 @12:41AM (#49486929)
And the compelling reason is always profit.
Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by otterley on Saturday August 29, 2026 @01:04AM (#49487027)
No it isn’t. Sometimes it’s security, or making the most out of limited resources.

Besides, not all profitable ventures are bad.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by fc417fc802 on Saturday August 29, 2026 @01:07PM (#49491502)
"The entire concept of NAT" was for profit? "Linux routers responding ICMP from 192.0.0.8 when not having an IP address" was for profit? What?

The grocery store down the road only sells me things for profit but I hope you're not trying to imply that's somehow nefarious.

Re:Saving 100 terabytes of memory by optimizing 1.1.1.1's DN... by seiferteric on Thursday August 27, 2026 @03:21PM (#49469920)
then they would be breaking DNS at scale.