Live data from Hacker News

Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

blog.cloudflare.com

141–150 of 306 posts

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#141

Earlier quoted context omitted.

Or optimize a bit earlier and prevent having to scale out to a bazillion systems.

The way I usually prevent having to scale out to a bazillion systems is never getting more than 10 users.

And that's why I charge $10,000,000/user/mo.

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#142
post #135

Earlier quoted context omitted.

Quite. I was a VMware fanboi (25+ years, man and boy) I still look after a few VMware estates and a lot of Proxmox ones (that used to run VMware). Hilariously, VMware is described as "enterprise class", which I can only conclude means MVP and a bit wanky. Today I repaired a Proxmox HA + Ceph node using boring old normal Linux skills and as it turns out I have 30 years of those. Part way through a remote v8 to 9 upgra…

When I was first getting into software dev, I thought 'enterprise' meant 'industrial grade', 'powerful', 'high-performing'. Then I actually met some enterprise software, and realised that it means 'expensive', 'bespoke', 'one-off', and usually 'janky'.

Enterprise quality software is a just a DOS application, probably written for dBase III, that has been rolled forward to the present day.

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#145
post #70
post #4

This is why system programming still matters. Looks like they're missing the obvious optimisation of putting the record data right after the CacheEntry members instead of allocating memory separately though. But that might just be me as a C-programmer talking and not be all that easy in Rust.

Unfortunately, Rust is not a good choice for this kind of tricks. This is where Zig shines. In Rust, you can’t even use proper arenas, which can help a ton with allocations. Cloudflare started to pick Zig recently, for projects, that have memory constraints.

I'd like to know why I can't use arenas in rust? Especially considering that I have used them before in rust.

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#147
post #68

This is the right way to deliver software. Produce working product first, validate the idea, stabilize the business, start generating profit, and then you can start optimizing your costs. In fact optimization is by far the easiest part of the process because there are many system programming experts on this HN thread who consider these optimizations to be trivial.

> start generating profit, and then you can start optimizing your costs

Good thing they jumped on that as soon as they were profitable instead of burning cash. Oh wait...

I think a distinction to draw here is that Cloudflare had relatively large capital raises and were almost immediately profitable¹. They had the luxury of throwing away money. Judicious optimisation makes sense for scrappy start-ups, especially when trivial optimisations like these could easily be farmed off to an agent.

¹ https://timeline.www.cloudflare.com/

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#148
post #68

This is the right way to deliver software. Produce working product first, validate the idea, stabilize the business, start generating profit, and then you can start optimizing your costs. In fact optimization is by far the easiest part of the process because there are many system programming experts on this HN thread who consider these optimizations to be trivial.

Its a yes if you do not know the domain space, query patterns well enough and also if the cost of optimization or time for optimization may have detrimental impact to business. In this case it most likely means that the crowd in the room did not anticipate much on this in early phases and no one in the room pointed these things out. The irony is that these performance and disk numbers are heavily discussed as a part of system design interviews.

> In fact optimization is by far the easiest part of the process because there are many system programming experts on this HN thread who consider these optimizations to be trivia

This is a misconception when you including roll out as a part of the change too, changing data once its running in production is hard, changing the data structure is even harder and when you talk about making changes in cache which is at the hot path its probably the hardest. Looking at the graph at the end it looks like it took them 4+ months to roll out the changes after optimization.

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#149
post #135

Earlier quoted context omitted.

When I was first getting into software dev, I thought 'enterprise' meant 'industrial grade', 'powerful', 'high-performing'. Then I actually met some enterprise software, and realised that it means 'expensive', 'bespoke', 'one-off', and usually 'janky'.

Enterprise means it has SSO and a support contract

Lol, so true

Re: Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache

#150
post #140

Earlier quoted context omitted.

i suppose you could say the same about buying a house. just make that initial 300.000 and from there on out its easy. everything looks better on paper

My house is a ~700 sqft. condominium, gov. subsidized for lower income individuals, and even my mortgage is more than 300k… maybe I’m just basing my info off of coastal city prices, but is it possible to buy a reasonably nice home located in a reasonably nice amerikkkan city… for $300k in 2026?

That would buy you thousands of square feet and often several acres within 20 minute drive to a lot of US city downtown areas.
Post reply on HN