Dev News Daily ENDE

Cloudflare halves DNS build delay with targeted zone builds and cuts peak memory by 85%

Cloudflare has described a rework of the Zone Builder, the stage of its DNS pipeline that turns a change to a customer's zone into the keys its authoritative servers read from Quicksilver, the company's distributed key-value store. In 2022 the builder took about 250 record changes per second; today it takes about 700, plus around 100 other events such as zone setting changes, and some zones now hold more than 20 million records.

Record changes were already handled with per-record builds. Zone setting changes were not: they triggered a rebuild of the whole zone, and the cost of that grew with the zone's size. Cloudflare says the difficulty was proving when a smaller build was safe, because a zone event can come from many products, may not say what changed, and can affect data shared by several zones with the same name. Too much work wastes capacity, too little leaves stale DNS data at the edge.

The answer was a targeted build planner that picks the smallest build it can prove safe, and a scheduler that merges work queued for the same zone. Setting changes no longer rebuild zones with tens of millions of records. Cloudflare reports an 85% cut in peak memory, and says the headroom let it shorten waits the pipeline kept for resilience, halving the time from a DNS change to its data being written to Quicksilver.

Cloudflare halves DNS build delay with targeted zone builds and cuts peak memory by 85%
Cloudflare halves DNS build delay with targeted zone builds and cuts peak memory by 85% — Dev News Daily

What it means

Customers do not need to change anything; the effect is faster propagation of their DNS edits. The engineering lesson is in the framing: the old builder was simple because it never needed to know why a zone changed, and the new one is fast only because it now has to prove what a change touches.

Written by Victoria Shinder.