deniz.in

Markets

Weather

Loading weather

· via Cloudflare blog

Cloudflare extends Flamingo testing framework to probe DNS propagation at its edge

After a scheduling bug left DNS record changes unpublished for hours, Cloudflare extended its Flamingo end-to-end test framework with a DNS module that measures propagation from every data center and gates releases.

Cloudflare extends Flamingo testing framework to probe DNS propagation at its edge

Cloudflare has published an engineering writeup on how it extended Flamingo, its internal end-to-end testing framework, to probe DNS across its production edge, and on how those probes now determine whether a release proceeds or is rolled back. According to the Cloudflare blog, the work was prompted by a rollout of the service that publishes DNS records to Cloudflare's edge in which a scheduling bug let some record changes sit unpublished for hours. The service stayed up and looked healthy, but new hostnames were slow to resolve and certificates could not be issued until the bug was fixed.

Why DNS failures evade monitoring

The team's conclusion was that DNS failures are hard to catch with conventional checks because they develop slowly, are distributed across the network, and only affect part of the traffic. Unit tests had passed and dashboards were green during the incident. What the team wanted instead was to exercise DNS the way customers actually experience it: all the time, from every data center, against production systems.

What Flamingo is

Flamingo predates the DNS work. Cloudflare built it to run constant automated testing against real systems, originally focused on complex multi-step HTTP scenarios, and it now runs tests against the edge at a rate of hundreds of millions per day. The company has previously described using it during CDN stack upgrades, though that accounts for only a slice of its internal use.

The framework ships with a control plane and scheduler that let teams aim tests at particular environments, individual data centers, or a chosen share of bare-metal servers, and it plugs into Cloudflare's internal reporting, metrics and analytics. It was also built for predictable performance on bare metal in resource-constrained settings, and Cloudflare says it aims for internal tooling that is simple to use yet powerful enough to cover over 80 percent of use cases.

A DSL and a module system

Two design choices stand out.

First, tests are written in a custom domain-specific language rather than a general-purpose one. The DSL follows a simple setup, request, response format, later generalized so the middle step is an arbitrary action. In the post's example, a five-line script verifies that plain HTTP requests redirect to HTTPS by asserting a 301 status and the resulting Location header. The reasoning is developer experience: when a test written in a traditional language fails, its author ends up debugging both the upstream system and the test code. A constrained DSL keeps the investigation pointed at the system under test.

Second, the action layer is modular. Flamingo is written in Rust, which Cloudflare credits for consistent performance and, above all, a type system strong enough to make the modularity workable: actions and their outputs are modeled as typed enumerations, with one action variant for HTTP queries and another for DNS queries carrying a query name, a query type and parameters. Action execution is decoupled into dynamically dispatched functions, so a module author writes only the action's logic while scheduling and resource management remain the framework's job.

Probing DNS from the edge

DNS's hierarchical structure makes propagation a natural thing to measure. When a record in a Cloudflare zone changes, the update has to reach the authoritative servers before it becomes widely visible, and caches in between may keep serving old values until their TTL expires. Freshness matters most exactly where the incident bit: issuing certificates and failing traffic over both depend on up-to-date records.

By adding a DNS action alongside the existing HTTP one, Flamingo can issue DNS queries from the same edge vantage points it already uses and treat the responses like any other measured outcome. Cloudflare says the propagation measurements produced this way are now part of the release decision, acting as the signal that tells the team whether to keep rolling out or to roll back.

Why it matters

The writeup is a compact case study in verifying distributed systems at the point of use. The incident has a familiar shape: a deployment that passes unit tests and keeps dashboards green while quietly degrading a downstream behavior. Cloudflare's fix was not more unit tests but verification moved to the customer's vantage point, in production, from every data center, continuously, with the results wired into the release process so the signal has consequences. The design lessons travel too: a small DSL can trade expressiveness for debuggability in test tooling, and a typed, dynamically dispatched action layer lets teams extend a platform without each of them reimplementing scheduling and resource management. And for organizations that keep rediscovering that, when something breaks, it is always DNS, the post makes the case that DNS behavior deserves the same end-to-end treatment as HTTP.

  • #cloudflare
  • #dns
  • #testing
  • #rust
  • #reliability

Related posts