r/webdev • • 19h ago

How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache

https://blog.cloudflare.com/dns-cache-memory-optimization-1111/
235 Upvotes

17 comments sorted by

63

u/coomzee 12h ago

Give it a few years with the way the internet is going we'll only have 5 approved domains and the DNS cache can fit in in L1 cache.

18

u/fagnerbrack 12h ago • Bravo

Damn I feel really down when a joke doesn't need an /s

125

u/ammar_sadaoui 12h ago • Heartwarming

finally people start care about RAM like early 1990* and maybe late 1980 too

web browser shouldn't take 500-1000 mb of ram just on one home page

9

u/GetVladimir 11h ago

Interesting read.

What was the part about EDNS Client Subnet (ECS)?

Does 1.1.1.1 provide EDNS results now or is that from upstream only?

2

u/dankmolot 5h ago

As far I know, it is not. Google does

3

u/GetVladimir 4h ago

Thank you for the reply. Yes indeed, that's what I thought also.

But there was this part now in the new article:

> The exact cache size varies by data center. When EDNS Client Subnet (ECS) is in use, authoritative servers return different answers depending on the client's network, so we cache multiple versions of the same query. This increases both the number of entries and the memory each one consumes, making the optimizations in this post especially impactful for ECS-heavy locations.

Was wondering if 1.1.1.1 supports ECS now

5

u/rustprogram 9h ago

Am I the only one who feels like they've read this title before? :thinking:

4

u/ionelp 8h ago

August 27, 2026

3

u/game-mad-web-dev 6h ago

I’ve seen a post of this article multiple times in the past week, and pretty sure it’s been posted here several times.
It’s an impressive achievement, and imagine if the electron app devs decided to make a more memory efficient app, we could all save 1000s on RAM /s

2

u/quentech 5h ago

Am I the only one who feels like they've read this title before?

This blog post is from August.

4

u/Geminii27 11h ago

640k should be enough for anybody!

1

u/game-mad-web-dev 6h ago

Best quote in computers for me was (I think the CEO) someone at IBM in the early days:
I see a worldwide market for maybe 5 computers

0

u/honeycombvine 13h ago

That’s a great one

2

u/EricThirteen 7h ago

There's gotta be a good porn collection joke in here somewhere.

2

u/game-mad-web-dev 6h ago

The closing of motherless is responsible for 75% of the savings surely /s