RC RANDOM CHAOS

Cloudflare Halves DNS Build Delays, Cuts Memory 85% With Targeted Builds

· via Hacker News

Original source

We halved DNS build delay and cut memory use by 85%

Hacker News →

Cloudflare’s Zone Builder handles DNS propagation, processing around 700 changes per second plus 100 additional zone setting events. As zones grew to contain more than 20 million records, the old full-rebuild approach—reading every record into memory and comparing all keys—became unsustainable for the largest zones.

The team built a targeted build planner that determines the minimal work needed for each change. Most DNS record updates only require rebuilding specific record names. Nameserver or wildcard changes add metadata updates. Settings like Universal SSL trigger apex-level changes. A new scheduler combines work for the same zone. The planner never chooses less work than provably safe, preventing incomplete or stale DNS data at the edge.

The improvements delivered concrete results: peak memory consumption fell 85%, and the time from DNS change to Quicksilver write halved.

Read the full article

Continue reading at Hacker News →

This is an AI-generated summary. Read the original for the full story.