---
title: "How we halved DNS build delay and cut memory use by 85%"
description: "Cloudflare's DNS Zone Builder now uses a targeted build planner that picks the smallest provably safe build (resources only, resources plus metadata, apex plus metadata, purge, or full zone) and a unified per-zone scheduler that merges queued work."
url: "https://swe.quest/articles/how-we-halved-dns-build-delay-and-cut-memory-use-by-85-571d0d573d8e7634"
canonical: "https://blog.cloudflare.com/dns-targeted-zone-builds/"
source: "Cloudflare"
published: "2026-11-02"
difficulty: "hard"
kind: "Case study"
reading_minutes: 15
tags: ["dns","scalability","messaging","performance","testing"]
---

# How we halved DNS build delay and cut memory use by 85%

A post on [Cloudflare](https://swe.quest/sources/cloudflare.md), published 2026-11-02, 15 min read, Case study. Original: [https://blog.cloudflare.com/dns-targeted-zone-builds/](https://blog.cloudflare.com/dns-targeted-zone-builds/)

## Summary

Cloudflare's DNS Zone Builder now uses a targeted build planner that picks the smallest provably safe build (resources only, resources plus metadata, apex plus metadata, purge, or full zone) and a unified per-zone scheduler that merges queued work. Zone setting changes no longer rebuild zones with tens of millions of records. The change cut peak memory by 85% and halved the time from a DNS change to its write to Quicksilver. Correctness comes from enriched Kafka events, re-planning against a fresh replica snapshot, careful handling of metadata keys shared across same-name zones, soft Kafka offset commits, byte-for-byte equivalence tests, and a mirror pipeline whose output is diffed against production.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [DNS](https://swe.quest/tags/dns.md) (Infrastructure)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)
- [Queues & messaging](https://swe.quest/tags/messaging.md) (Backend & APIs)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)

## Prerequisites

- authoritative DNS basics ([easy posts on DNS](https://swe.quest/tags/dns.md?difficulty=easy))
- Kafka partitions and offsets ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))
- database replication lag ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- key-value stores

## Keywords

Cloudflare, Zone Builder, Quicksilver, Kafka, CAA records, Durable Objects

## Related posts

- [Lessons Learned From Running Apache Airflow at Scale](https://swe.quest/articles/lessons-learned-from-running-apache-airflow-at-scale-465dd0ced6d11da7.md): Shopify Engineering · 2022-05-23 · Medium · 12 min read · Scheduling, Data pipelines, Multi-tenancy, Scaling, Kubernetes
  Shopify runs Airflow 2.2 on Kubernetes with the Celery executor and MySQL 8, and its largest environment handles over 10,000 DAGs and 150,000 runs per day.
- [FOQS: Making a distributed priority queue disaster-ready](https://swe.quest/articles/foqs-making-a-distributed-priority-queue-disaster-ready-0c0b1a2a20084eae.md): Meta Engineering · 2022-01-18 · Medium · 10 min read · Queues & messaging, Resilience, Replication, Distributed systems, MySQL
  Meta's FOQS distributed priority queue moved from isolated regional installations on semi-synchronous replicated MySQL to a single global installation, after Hurricane Florence in 2018 exposed manual traffic rebalancing and items stuck on unreachable shards.
- [London Meetup Report: How Cloudflare Processes Hundreds of Millions of Rows per Second with ClickHouse](https://swe.quest/articles/london-meetup-report-how-cloudflare-processes-hundreds-of-millions-of-rows-per-401f4932b5fd9da3.md): ClickHouse · 2023-09-19 · Easy · 3 min read · Analytics & OLAP, Scaling, Databases
  Cloudflare runs more than a thousand active ClickHouse replicas ingesting hundreds of millions of sampled rows per second.
- [Slack’s Incident on 2-22-22](https://swe.quest/articles/slack-s-incident-on-2-22-22-7a35cde32cfb5fd8.md): Slack Engineering · 2022-04-26 · Medium · 12 min read · Incidents & postmortems, Caching, Resilience, MySQL, Distributed systems
  A Consul agent rolling restart caused Mcrib, Slack's memcached control plane, to replace and flush cache nodes, dropping hit rates during peak traffic.
- [Building Self-driving Kafka clusters using open source components](https://swe.quest/articles/building-self-driving-kafka-clusters-using-open-source-components-f376c07215769703.md): Slack Engineering · 2022-02-11 · Medium · 11 min read · Queues & messaging, Scaling, SRE, Chaos engineering, Infrastructure as code
  Slack standardized roughly 10 Kafka clusters (0.7 PB, 6.5 Gbps peak) onto Kafka 2.0.1 and automated their operation with Chef, Terraform ASGs, Consul-assigned Zookeeper IDs, Cruise Control, Kafka Manager and a Prometheus offset exporter.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
