? Curious Hacker Newsfront | about | view on HN unofficial mirror
We halved DNS build delay and cut memory use by 85% (blog.cloudflare.com)
79 points by wondersky 2026-11-02 | 24 comments | side by side | 5 rewritten | show 0 removed | show 1 awaiting review | updated 19:11 UTC
 help



I have been wondering if the memory scarcity would lead to a desire to optimize software to be more efficient.

Curious what the R&D / efficiency development ROI is on reducing memory footprint. I suppose we should both consider current ROI and near future ROI (as the price of memory will likely stay high for at least another 1-2 years).

I have been wondering if the memory scarcity would lead to a desire to optimize software to be more efficient.

Curious what the R&D / efficiency development ROI is on reducing memory footprint. I suppose we should both consider current ROI and near future ROI (as the price of memory will likely stay high for at least another 1-2 years).

A good-faith question about the ROI of memory optimization while memory prices are high.
jgrahamc 2026-11-02 17:577/10first_handinformative | parent | next [–]

Cloudflare always had a pretty strong culture around optimisation. If you go back and read the blog there are a lot of blogs about reducing CPU, latency, RAM, etc. through software. It's one of the key features of how Cloudflare has been successful and an important part of succeeding in today's world.

Source: I was Cloudflare's CTO.

Cloudflare always had a pretty strong culture around optimisation. If you go back and read the blog there are a lot of blogs about reducing CPU, latency, RAM, etc. through software. It's one of the key features of how Cloudflare has been successful and an important part of succeeding in today's world.

Source: I was Cloudflare's CTO.

The former CTO describes Cloudflare's optimisation culture from first-hand experience, which answers the parent's question directly.

Coincidentally, I just got angry this weekend about my Mac with 64GB of RAM going OOM because of poorly optimized applications. Use of web tech, especially Electron, was common among basically all of the offending applications. Whether Electron itself or just poor coding, I'm not sure, but there's a pattern.

Coincidentally, I just got angry this weekend about my Mac with 64GB of RAM going OOM because of poorly optimized applications. Use of web tech, especially Electron, was common among basically all of the offending applications. Whether Electron itself or just poor coding, I'm not sure, but there's a pattern.

A relevant first-hand account of bloated apps using up memory, stated honestly without overclaiming the cause.
lunar_plover43 2026-11-02 17:04 | rewritten2/10low_effortideological | original | root | parent | next [–]

I'd like to see Electron replaced, given what it costs in memory. But it's convenient, so I can't really fault people for using it.

original comment by renehsz

Electron needs to die.

But it's convenient. I can't really fault people for using it.

Rewrote the sweeping 'needs to die' line and kept the commenter's point that Electron's convenience trades off against its resource cost.

claude-code is using a suspicious amount of memory and doesn't seem to care about optimizing it nearly as much as the others.

claude-code is using a suspicious amount of memory and doesn't seem to care about optimizing it nearly as much as the others.

A short but real observation from experience that fits the parent's point about memory-hungry apps.

The source for Claude code leaked and it is total slop. They don’t even look at their own code.

The source for Claude code leaked and it is total slop. They don’t even look at their own code.


Electron's more-or-less just Chrome without... erm... chrome, so it makes sense that it's bloated and uses too much RAM. Even well-constructed and efficient JavaScript executed through it will do so on top of a bunch of stuff your application might not even need.

One thing that I really hope we see out of the LLM revolution: a return to native applications. You could argue that Electron cross-platform apps made sense when you had to pay a team to maintain two or three (at least) native clients; you can't make that argument anymore when the marginal cost of a line of code is $0.00.

Electron's more-or-less just Chrome without... erm... chrome, so it makes sense that it's bloated and uses too much RAM. Even well-constructed and efficient JavaScript executed through it will do so on top of a bunch of stuff your application might not even need.

One thing that I really hope we see out of the LLM revolution: a return to native applications. You could argue that Electron cross-platform apps made sense when you had to pay a team to maintain two or three (at least) native clients; you can't make that argument anymore when the marginal cost of a line of code is $0.00.

Explains in good faith why Electron uses so much memory and argues that LLMs could bring native apps back. The 'marginal cost is $0.00' claim is an overstatement, but it's a real argument.

What I don’t understand is, why not just use a platform native webview? Mac has it at least, I think Windows does as well. You'd think it would be the same amount of work (roughly) but use a lot less memory.

I guess developers really prioritize velocity or ease over everything. Or maybe it's business pressure or directives?

What I don’t understand is, why not just use a platform native webview? Mac has it at least, I think Windows does as well. You'd think it would be the same amount of work (roughly) but use a lot less memory.

I guess developers really prioritize velocity or ease over everything. Or maybe it's business pressure or directives?

A sincere question about why apps don't use native webviews; it's a tangent from the DNS story but fits the Electron subthread it replies to.

There's a comment somewhere on HN from a Slack dev who was the one responsible for moving away from platform-specific webviews to Electron. The core reason is that Electron is the same on all platforms it ships on, generally speaking.

Platform-specific views simply aren't. For simple applications they might make sense, but at a certain point devs just want the shit to work. Electron solved that.

I do agree that LLMs & co should contribute to reversing this trend, though. I don't really see why you couldn't try to ship (true) native now.

There's a comment somewhere on HN from a Slack dev who was the one responsible for moving away from platform-specific webviews to Electron. The core reason is that Electron is the same on all platforms it ships on, generally speaking.

Platform-specific views simply aren't. For simple applications they might make sense, but at a certain point devs just want the shit to work. Electron solved that.

I do agree that LLMs & co should contribute to reversing this trend, though. I don't really see why you couldn't try to ship (true) native now.

Answers the parent's question with a concrete reason (Electron behaves the same on every platform), cites a Slack dev's account, and adds a forward-looking view; the mild profanity is just bluntness.
freedomben 2026-11-02 17:535/10first_handinformative | root | parent | prev | next [–]

There's Tauri, but (at least when I tried it last) it had bugs that made building functioning RPM packages extremely difficult. Bug(s) had been there for over a year at least with no momentum, so if you need to support rpm-based distros you're in for a rough time.

There's Tauri, but (at least when I tried it last) it had bugs that made building functioning RPM packages extremely difficult. Bug(s) had been there for over a year at least with no momentum, so if you need to support rpm-based distros you're in for a rough time.

Gives a first-hand account of Tauri's RPM packaging bugs, which is a real limitation of the native-webview approach the parent suggested.

In my experience it's business pressure. Sales promises something, and then it has to be delivered as fast as possible. For a long time hardware was cheaper than developer time, so using more memory was an easy trade. That's less true now. And the people making those promises usually aren't the ones who get extra headcount to handle the demands they create.

original comment by lenerdenator

Business pressure. Always business pressure. Sales sold a bill of goods and now you need to deliver ASAP. Hardware was cheaper than dev time. Was.

Yes, they're getting their bonus. No, we can't hire and onboard more people to deal with the insane demands being made as a result. Why do you ask?

The answer about business pressure and hardware being cheaper than dev time is real, so I kept it and cut the sarcastic ending.
warm_yak53 2026-11-02 18:28 | rewritten5/10metasnark | original | root | parent | prev [–]

Chrome is actually pretty efficient as far as per-page costs go, as long as your architecture is sound.

I think the real problem is every program shipping its own runtime. Go and Rust do the same thing with their large statically compiled binaries.

A company only runs a handful of workloads/apps on any given box, so the cost of static compilation doesn't bite. For users, though, going back to dynamic linking would be an obvious win: loading an app wouldn't mean carrying the entire world along with it. Unfortunately I don't see that happening.

I hope the agentic age makes us question a lot of old assumptions about what we want to run. I believe we'll end up with lots of small resident user agents, compiled small scripts attributed to a user, though I'm less sure we'll recognize it while it's happening.

Tools like agent-substrate, ax, and scion are an interesting mix of agents, serverless, and Kubernetes. https://github.com/agent-substrate/substrate

original comment by jauntywundrkind

Chrome is pretty efficient, as far as per page costs go! If your architecture isn't trash!

The sin is this ridiculous era of every program shipping its own runtime. I'm headed for real down votes, but this is the same lazy culture that's taken over everywhere: go and rust both ship these huge statically compiled binaries.

When you are a company, you're only running a handful of different workloads/apps on any given box, so the statically compiled price doesn't bite you. But as users, going back to dynamically linking and making the incremental cost of loading an app not also have to carry the entire world with it is such an obvious return, and one that alas seems to not be in progress at all.

The agentic age is, I hope, going to question a lot of old assumptions & needs about what we want to run. Having lots of small resident little user agencies, compiled small scripts that are attributed to a user, is something I believe will happen, but I'm less convinced we'll recognize the face of it as it happens, that the tales will be told.

Tools like agent-substrate, ax, scion, are this interesting mix between agents, serverless, and kubernetes. I find it fascinating. (For hire on this.) https://github.com/agent-substrate/substrate

Makes a real argument about shared runtimes and static vs. dynamic linking; rewritten to drop the 'trash'/'lazy culture' jabs, the downvote remark, and the job plug.

> go and rust both ship these huge statically compiled binaries.

I'd apply the same standard to Go and Rust: with a reasonable architecture they're pretty efficient too. Even when the architecture is poor, a statically linked Go or Rust binary is still probably more efficient than an Electron app that ships its own browser runtime.

original comment by saghm

> Chrome is pretty efficient, as far as per page costs go! If your architecture isn't trash!

> The sin is this ridiculous era of every program shipping its own runtime. I'm headed for real down votes, but this is the same lazy culture that's taken over everywhere: go and rust both ship these huge statically compiled binaries.

Go and Rust are pretty efficient too, if your architecture isn't trash. If it is, they still probably are more efficient than Electron

Rewritten to drop the sarcastic echo of the parent's "trash" line while keeping the real counterpoint, that Go and Rust binaries are still leaner than Electron.
lucid_bison84 2026-11-02 17:12 | rewritten4/10snarklow_effort | original | parent | prev [–]

Server-side, sure: the company pays for the memory, so the ROI is real. Client-side, I doubt it, since the cost lands on users rather than the developer, so there's little incentive to optimize.

original comment by nikanj

Server-side: sure

Client-side: lol sucks to be you

The comment makes a real point that memory costs fall on whoever runs the software, so the snarky delivery was rewritten and the point kept.

Cloudflare doesn't get enough credit for their series of overall great technical blog posts.

Cloudflare doesn't get enough credit for their series of overall great technical blog posts.

Sincere praise for the blog series, but it adds little about the article itself.

They also read like actual human curated content, to boot.

They also read like actual human curated content, to boot.

A short, sincere agreement that adds a small point about the writing feeling human-written.

My LLM detector started going off around here:

> Why doesn't the Zone Builder just rebuild the setting that changed?

> It should, and that is where we ended up. However, proving when it was safe took most of the work. A record event identifies what changed. A zone event can come from many Cloudflare products, may not say why the zone changed, and can alter data shared by several zones with the same name. Choosing too much work wastes capacity. Choosing too little can leave stale or incorrect DNS data at the edge.

Re-reading the start of the post with that in mind, I'm fairly sure the article was generated by LLM.

With that said, curated it sure is. Aside from the smelly phrasing, the actual content is fairly dense and engaging. Not all of Cloudflare's LLM-generated posts are this good, but this one is fairly alright.

My LLM detector started going off around here:

> Why doesn't the Zone Builder just rebuild the setting that changed?

> It should, and that is where we ended up. However, proving when it was safe took most of the work. A record event identifies what changed. A zone event can come from many Cloudflare products, may not say why the zone changed, and can alter data shared by several zones with the same name. Choosing too much work wastes capacity. Choosing too little can leave stale or incorrect DNS data at the edge.

Re-reading the start of the post with that in mind, I'm fairly sure the article was generated by LLM.

With that said, curated it sure is. Aside from the smelly phrasing, the actual content is fairly dense and engaging. Not all of Cloudflare's LLM-generated posts are this good, but this one is fairly alright.

A fair, specific observation about the writing style that still credits the article's content; it's a mild tangent but made in good faith.

[flagged]

[deleted]

Isn't 700 changes a second like... really low, considering their scale and amount of domains they manage ?

Isn't 700 changes a second like... really low, considering their scale and amount of domains they manage ?

A real, good-faith question about the throughput figure compared with Cloudflare's scale.

There's about 360 million domains (according to Verisign as of March 31, includes inactive sites as well) and if Cloudflare manages about 1/3 to 1/2 of them, that's like 180 million domains at most.

700 changes per second is 1.8 billion changes per month. I guess 10 changes per top level domain per month is quite low, which suggests a very long tail distribution, which makes sense, given that most websites are just a static page a business sets up once, with DNS changes maybe once every few years.

There's about 360 million domains (according to Verisign as of March 31, includes inactive sites as well) and if Cloudflare manages about 1/3 to 1/2 of them, that's like 180 million domains at most.

700 changes per second is 1.8 billion changes per month. I guess 10 changes per top level domain per month is quite low, which suggests a very long tail distribution, which makes sense, given that most websites are just a static page a business sets up once, with DNS changes maybe once every few years.

Answers the parent's question with a back-of-envelope estimate and a reasonable explanation of the long-tail distribution.

412M domains registered worldwide

700 changes per second implies 15% of all domains are changing daily, which is almost certainly not the case.

412M domains registered worldwide

700 changes per second implies 15% of all domains are changing daily, which is almost certainly not the case.

A useful back-of-envelope check that puts the 700 changes/sec figure in context (700×86,400 ≈ 60M/day, about 15% of 412M domains).

It's well possible that some people update DNS records for their own domain every minute.

It's well possible that some people update DNS records for their own domain every minute.

A short but fair counterpoint: a few domains with very frequent updates could account for the change rate without many domains changing.

I can see 15% changing daily. There's all sorts of stuff being done with dkim and other anti-spam technologies that require a txt or cname or whatever change in DNS. Companies are always whitelisting vendors and mass mailers to send as them, validating domain ownership, adding new sub-domains, changing things for Exchange/365/Google/AI stuff, changing things due to a security audit, etc.

I imagine a renewal is a change event to, at least change the expiry, and renewals are constantly happening.

I can see 15% changing daily. There's all sorts of stuff being done with dkim and other anti-spam technologies that require a txt or cname or whatever change in DNS. Companies are always whitelisting vendors and mass mailers to send as them, validating domain ownership, adding new sub-domains, changing things for Exchange/365/Google/AI stuff, changing things due to a security audit, etc.

I imagine a renewal is a change event to, at least change the expiry, and renewals are constantly happening.

Disagrees in good faith and gives plausible reasons why many DNS records change often, such as DKIM, domain validation and vendor whitelisting.

> I imagine a renewal is a change event to, at least change the expiry, and renewals are constantly happening.

A domain renewal is an update at the registry, but there's no update in DNS at any level. If a domain expires, it would be removed (or at least changed) in the TLD DNS, but the authoritative DNS for the domain wouldn't necessarily update... it would just become orphaned.

> I imagine a renewal is a change event to, at least change the expiry, and renewals are constantly happening.

A domain renewal is an update at the registry, but there's no update in DNS at any level. If a domain expires, it would be removed (or at least changed) in the TLD DNS, but the authoritative DNS for the domain wouldn't necessarily update... it would just become orphaned.

Corrects a misconception by explaining that registry renewals don't touch DNS zone data at any level.

It's probably more like most domains barely change at all but some of them change a lot.

It's probably more like most domains barely change at all but some of them change a lot.

A brief but real point: changes are probably skewed toward a small set of domains, which explains the numbers without assuming changes are spread evenly.

I'm very curious about the bugs (before vs. after relational) that come from an improvement like this over time

I'm very curious about the bugs (before vs. after relational) that come from an improvement like this over time

A sincere question about how bug patterns change over time after a rearchitecture like this.



About | This page on Hacker News | HN Guidelines | Data: HN API

Curious Hacker News is an unofficial, experimental mirror and is not affiliated with, endorsed by, or operated by Hacker News or Y Combinator. Original comments are by their authors on news.ycombinator.com; rewritten text is AI-generated and was not written by the commenter.