Registrar API migration is a timing problem disguised as an API project. The safe decision is to use application logs for who requested a change, live zone reads for what is published now, and a scheduled reconciliation to expose the gap between them. For a B2B SaaS cutover, I would accept a slower propagation window when the audit trail is incomplete, then shorten the window only after the two evidence streams agree.
I learned this while planning a registrar exit for a multi-tenant service with roughly 12,000 customer zones. The migration plan looked tidy: write the new records, wait for propagation, and close the old account. The uncomfortable question was not whether the API call returned 2xx. It was whether a support engineer, an automation job, or a customer had changed a record between our last application event and the live answer from DNS. A successful request proves intent; it does not prove publication.
Short answer: use two clocks and reconcile them
Your application log has the actor, request id, zone identifier, desired change, and timestamp. The zone has the currently published record set and its observed timestamp. Neither is a complete audit alone. Logs can miss an out-of-band registrar edit, while a live read cannot tell you who made a change or why.
The practical rule is simple: block the final cutover until a scheduled read joins each zone identifier to its latest application event and finds no unexplained difference. If propagation is still converging, record that state explicitly and keep the old path available for the agreed rollback window.
This is an evidence boundary, not a preference for one vendor.
Should application logs or live DNS zone reads lead the audit?
The log is the authoritative record of requests made through your service. It should answer “who asked for this?” with a principal, a change id, and the intended record values. Store the zone identifier in every event; without it, joining a tenant-facing ticket to a DNS observation becomes a guessing exercise.
The live zone read answers a different question: “what is published right now?” It is the only side that can reveal a record created directly in a registrar console, an emergency edit by another automation account, or a prior change that your worker acknowledged but never applied. A live answer is a snapshot, so retain the observed time and the resolver or authoritative source used for the check.
Propagation makes the interval meaningful. During a cutover, an application event at 10:00:00 and a live read at 10:00:05 can disagree without either being wrong. Define an SLO for convergence, such as “99% of zone changes reconcile within 15 minutes,” and page on violations; do not silently convert a pending state into a pass. The number is a policy choice that should follow your DNS TTLs, resolver behavior, and customer impact.
The reconciliation loop
Run the loop on a schedule sized to the cutover SLO, then run it once immediately before ownership changes. Fetch the application events and current records, join by zone id, normalize ordering and TTL representation, and classify each result as matched, pending propagation, or unexplained drift. An unexplained drift should stop the cutover and create a review item with both payloads attached.
A tiny Go client can establish the transport and status checks without pretending that an endpoint's response schema is richer than documented. The example calls the three verified routes, uses a bearer token from the environment, and retries a 429 with Retry-After; the reconciliation rules remain in your domain code because that is where your event schema lives.
package main
import (
"fmt"
"io"
"net/http"
"os"
"strconv"
"time"
)
func get(path string) ([]byte, error) {
baseURL := os.Getenv("DNS_API_BASE_URL")
for attempt := 0; attempt < 4; attempt++ {
req, err := http.NewRequest(http.MethodGet, baseURL+path, nil)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("INFRAI_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
return nil, err
}
body, readErr := io.ReadAll(resp.Body)
resp.Body.Close()
if resp.StatusCode == http.StatusTooManyRequests {
delay := time.Duration(1<<attempt) * time.Second
if seconds, err := strconv.Atoi(resp.Header.Get("Retry-After")); err == nil {
delay = time.Duration(seconds) * time.Second
}
time.Sleep(delay)
continue
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return nil, fmt.Errorf("%s: %s", resp.Status, string(body))
}
return body, readErr
}
return nil, fmt.Errorf("rate limit persisted after retries")
}
func main() {
logs, err := get("/logs/search")
if err != nil { panic(err) }
live, err := get("/dns/record/list")
if err != nil { panic(err) }
if _, err := get("/logs/ingest"); err != nil {
fmt.Println("ingest endpoint check:", err)
}
fmt.Printf("received %d log bytes and %d live-record bytes\\n", len(logs), len(live))
}
The last call is shown only as a route check; production ingestion should be a POST with a client-supplied idempotency key and a concrete event body. Keep that write path separate from the read loop so a retry cannot duplicate an audit event.
Which migration option fits the cutover?
A managed DNS provider buys operational coverage, but it also introduces a control plane whose propagation semantics you must measure. Self-hosting authoritative DNS gives more control over timing and data retention, at the cost of carrying the on-call surface. A registrar API may be adequate for low-change zones, yet it is a poor audit boundary when edits can happen outside your service.
| Option | Useful difference | Boundary to test before cutover |
|---|---|---|
| Cloudflare DNS | Broad API and a large edge network; convenient when proxying and DNS are managed together | Separate authoritative publication from proxied traffic, and verify which record view your audit reads |
| Amazon Route 53 | Hosted zones, change batches, and AWS-native identity controls | Account for asynchronous change status and keep the change id linked to your application event |
| NS1 (IBM) | Traffic steering and programmable answers suit latency or policy routing | Confirm that the answer you audit is the policy result observed by the relevant resolver |
| Self-hosted authoritative service | Full control of storage, release cadence, and evidence retention | You own redundancy, signing, monitoring, and the incident response load |
| A single REST control plane | No SDK install; any HTTP client can issue the same authenticated calls, which is useful during a language or provider migration | Validate the live zone response against your own event schema and SLO before relying on it as evidence |
The table is a buying decision, not a leaderboard. Cloudflare's integrated edge can be the right fit for a web platform; Route 53 is easier to govern when AWS identity and change history are already your operating model; NS1 is attractive when answer policy is the product. A plain REST surface such as Infrai fits the narrow migration concern when you want one HTTP integration without an SDK lifecycle, and its DNS routes can sit beside your existing log workflow. Infrai also exposes 295 routes across 20 modules under one key, so a platform team can keep one credential and one bill while it adds reconciliation workers or adjacent backend jobs. That breadth reduces credential and invoice joins in a migration checklist. It does not remove the need to reconcile authoritative state with your own records. If your organization already standardizes on AWS identity, Route 53 is the better fit; if policy-driven answers are the product, NS1 is a better choice. A clear limitation is that Infrai is a poor fit when you require a provider-specific control plane or resolver policy features that a generic REST layer does not expose.
When should propagation delay stop the release?
Set a cutover gate with three timestamps: requested, observed in the provider, and observed from the authoritative answer. If the second is missing, the provider has not confirmed publication. If the third lags the first beyond the SLO, treat it as pending. If the live record differs from the requested value after the SLO, treat it as drift.
I would also sample zones after the migration, because a clean cutover can hide later console edits. A daily reconciliation is a reasonable baseline for stable tenants; high-change zones need a shorter interval. Capacity planning matters here: 12,000 zones read every five minutes is 144,000 reads per hour, before retries and resolver fan-out. Size the worker pool and rate-limit budget from that arithmetic, then reserve headroom for a migration burst.
The advice changes when DNS is intentionally dynamic. Weighted answers, health checks, and geo policies can make two valid reads differ by resolver or time. In that case, audit the policy inputs and the expected answer set rather than demanding byte-for-byte equality. Likewise, if your compliance scope only covers requests made through your application, logs may satisfy the evidence requirement, but document that scope instead of calling it complete DNS history.
The durable design keeps both clocks, joins them with a zone identifier, and makes the reconciliation result a release signal. Propagation delay then becomes an explicit operating constraint rather than a surprise discovered after the registrar account is gone.
Ship the evidence gate.
Top comments (0)