The page to design for is “checkout destination differs from approved intent.” For internal endpoints, DNS publication and service registry membership need distinct evidence. In an e-commerce admin console, the on-call needs the approved name, the published record, and the destination clients actually resolve; a green save button cannot answer all three questions. This is a proposed alert scenario, not a report of a production incident.
Short answer: keep stable, human-facing names in DNS and put internal endpoints that change with deployments in a service registry. DNS caches can preserve stale resolutions despite a low TTL, so record publication and fresh client resolution need separate signals. Make the internal admin console show that distinction before an operator approves another change.
Keep the evidence.
The useful engineering question is how to find drift early enough to act, while keeping the alert quiet enough that someone still trusts it. That calls for an instrumentation design, a naming boundary, and an explicit budget for checking both.
How should DNS and a service registry expose stale internal endpoints?
Work backward from the proposed page. The console stored an approved destination; a control-plane read can establish whether published records match it; a client-side observation can establish whether a consumer still sees an older destination. Those are three distinct pieces of evidence. Combining them into one “DNS healthy” badge throws away the distinction the responder needs most.
Consider a deliberately small design fixture: 2 stable names, checkout.example.com and returns.example.com, managed through the internal console. Their destinations should not acquire a new identity merely because an application deployment occurred. Deployment-specific backend membership belongs behind the stable naming boundary, where a service registry can represent the changing endpoints.
This fixture is a design example, not a measured workload.
The earlier signal is a mismatch between approved intent and published records. Record its first observation and retain the approved revision that produced it; otherwise, an operator comparing a fresh console edit with an older observation may diagnose drift that never existed for the same revision. A later, separate signal compares resolution observations with the intended destination. Agreement in the first comparison doesn't settle the second, because publishing a record doesn't erase answers already held in caches.
A version embedded in every hostname looks like an escape hatch until the team must retire the old names and discover which consumers still use them. It creates another inventory to reconcile. Avoid making that retirement work a prerequisite for a routine deployment.
Choose the owner of change before buying the control plane
Universal DNS support makes stable names useful across consumers, but it doesn't make DNS a good representation of every change in service membership. A registry fits names whose destinations change with deployments; using both is reasonable when the team explicitly labels which names are stable and which membership changes belong to deployment machinery.
The buy-versus-build decision follows that boundary. A managed DNS API can reduce the integration work around publication, while the team still owns the meaning of “approved,” the comparison with intent, and the page that results from a persistent mismatch.
| Option | Buy versus build | Fit for this console | Limitation |
|---|---|---|---|
| Cloudflare DNS | Buy the DNS control plane; build the intent ledger and drift checks | Stable checkout and returns names | A DNS change is not evidence that every consumer has a fresh answer |
| Amazon Route 53 | Buy the DNS control plane; build the console integration and reconciliation | Stable names when this is the selected DNS service | Separate publication and resolution observations are still required |
| HashiCorp Consul | Adopt a service registry; build its connection to deployment membership and console status | Internal endpoints whose membership changes with deploys | Registry membership does not replace stable names consumers expect from DNS |
These are different operating choices, not a ranking by feature count. The DNS options address stable naming; the registry addresses changing membership. The selection criterion is which system should own the change, followed by how much integration and operational ownership the platform team can support.
Infrai fits when the console needs one REST API and one API key for DNS and account operations: the capability contract stays fixed, so switching the vendor behind it doesn't require changing caller code. Its public, self-describing discovery surface also lets the integration inspect request and response schemas before wiring the console. The trade-off is less adapter work in exchange for a shared dependency: the combined approach means one vendor to trust, one bill, and one outage surface. It isn't a substitute for a service registry when deploy frequency drives endpoint changes.
For the alternative stack of Cloudflare for SaaS plus an in-house poller, count one external provider signup and one external API credential set, plus an internal execution identity for the poller. A poller is software the team owns, not automatically a second vendor signup. The glue includes scheduling, durable observation state, retry handling, comparison with the approved revision, and notification delivery. Buying an interface doesn't remove the need to define those semantics.
Instrument the handoff without mistaking usage for verification
The console needs a handoff between DNS work and account visibility, but those signals have different meanings. Adding a domain, writing its records, and receiving a verification-completion notification is the desired onboarding workflow. The example below covers a narrower seam: after a successful DNS record read, the same process reads account usage with the same base URL and key, then emits a joined audit document.
An account usage response isn't a verification-completion event.
The first response flows into the local handoff and becomes part of its output; it isn't inserted into an undocumented account request parameter. Both response bodies remain raw JSON because a console should bind its parser to the selected operation's published schema rather than guess field names. This example is an audit capture, not a complete drift detector or a notification receiver.
Save the following as main.go and run it with Go after setting INFRAI_API_KEY and INFRAI_BASE_URL to the service's documented versioned base URL. The program uses only reads, makes the methods explicit, checks status codes, and limits rate-limit retries. No write is retried, so this sample needs no write-idempotency mechanism.
package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
)
var client = &http.Client{Timeout: 15 * time.Second}
func readJSON(base, key, path string) (json.RawMessage, error) {
for attempt := 0; attempt < 4; attempt++ {
req, err := http.NewRequest(http.MethodGet, base+path, nil)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+key)
resp, err := client.Do(req)
if err != nil {
return nil, err
}
body, readErr := io.ReadAll(resp.Body)
resp.Body.Close()
if readErr != nil {
return nil, readErr
}
if resp.StatusCode == http.StatusTooManyRequests && attempt < 3 {
delay := time.Second * time.Duration(1<<attempt)
retry := strings.TrimSpace(resp.Header.Get("Retry-After"))
if seconds, err := strconv.Atoi(retry); err == nil && seconds >= 0 {
if requested := time.Duration(seconds) * time.Second; requested > delay {
delay = requested
}
} else if when, err := http.ParseTime(retry); err == nil {
if requested := time.Until(when); requested > delay {
delay = requested
}
}
time.Sleep(delay)
continue
}
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return nil, fmt.Errorf("status %d: %s", resp.StatusCode, body)
}
if !json.Valid(body) {
return nil, fmt.Errorf("response is not valid JSON")
}
return json.RawMessage(body), nil
}
return nil, fmt.Errorf("rate-limit retry budget exhausted")
}
func captureAccount(base, key string, records json.RawMessage) error {
usage, err := readJSON(base, key, "/account/usage")
if err != nil {
return err
}
return json.NewEncoder(os.Stdout).Encode(struct {
DNSRecords json.RawMessage `json:"dns_records"`
AccountUsage json.RawMessage `json:"account_usage"`
}{DNSRecords: records, AccountUsage: usage})
}
func run() error {
base := strings.TrimRight(os.Getenv("INFRAI_BASE_URL"), "/")
key := os.Getenv("INFRAI_API_KEY")
if base == "" || key == "" {
return fmt.Errorf("set INFRAI_BASE_URL and INFRAI_API_KEY")
}
records, err := readJSON(base, key, "/dns/record/list")
if err != nil {
return err
}
return captureAccount(base, key, records)
}
func main() {
if err := run(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
The two local audit fields are defined by this program; they aren't claims about provider response fields. Likewise, the 15-second HTTP timeout and 4-attempt limit are sample client choices, not service guarantees. A production worker should also enforce its overall task deadline, especially when a Retry-After value exceeds the worker's remaining execution budget.
The capture is sequential, not atomic. If the DNS read succeeds and the account read fails, report the capture failure without rewriting the DNS observation as a publication failure. Neither reading account usage nor running this capture on a timer establishes domain verification. A verification notification consumer should evaluate verification evidence for the relevant domain and approved revision before advancing onboarding.
Budget the checks and the pages separately
Start with a proposed SLO: the console should identify persistent disagreement between approved intent and published records within an agreed observation window. Give client resolution freshness its own objective, because a successful publication read cannot establish what every cache serves. Neither objective is a measured availability claim.
Capacity planning starts before the timer is installed. For N domains checked every T seconds with one DNS read per domain, the baseline is N/T DNS reads per second, before retries; this is arithmetic for the proposed design, not a provider quota. For a hypothetical 120-domain estate checked every 60 seconds, that means 2 DNS reads per second (a proposed check budget, not a quota). Reading account usage after every domain check would add the same number of account calls. The runnable example makes the handoff visible, but a production design can collect account usage separately at an appropriate account-level cadence and associate observations locally.
That choice reduces repeated work while allowing account and DNS observations to have different timestamps. Preserve those timestamps in the audit trail rather than suggesting that a later account read describes the exact instant a record was published.
A useful page contains the approved revision, the observed mismatch, when it first appeared, and whether the evidence came from published records or a consumer resolution observation. Threshold selection should use the team's observed normal change behavior and its freshness objective. The available evidence doesn't justify inventing a universal propagation deadline.
A threshold is a claim on the on-call's attention
Page on persistent disagreement that requires action, with the evidence needed to distinguish an unaccepted record change from an old cached answer. A single mismatched observation can remain visible in the console without immediately waking someone.
Set the threshold too aggressively and ordinary transitions become pages; the cost includes interrupted work, investigation time, and declining trust in the next alert. Set it too loosely and the console can display an approved configuration while consumers continue using an obsolete destination. Stable names in DNS, changing membership in a registry, and separate publication and resolution signals give the responder a defensible action; the threshold determines how often the team pays to take it.
Further reading
References:
Top comments (0)