Customer Domain Verification Needs Evidence Before Retries (For Marketplace Sellers)
Automatic retries reduce onboarding abandonment, but unrestricted rechecks consume verification capacity without establishing that a seller's domain is ready. TL;DR: use bounded scheduled polling and a rate-limited customer-triggered recheck that enter the same verification queue; activate each capability only on its own evidence. A successful ownership check must not silently become a promise of mail deliverability.
Consider a marketplace seller connecting a branded storefront and preparing customer notifications from that domain. For this design review, I would trace one bounded production scenario: the seller changes a DNS record, presses recheck twice, and waits while the scheduled attempt is also due. This is a hypothetical failure exercise, not an incident report. The question is what those three requests are allowed to prove, and how much work they can create.
Evidence comes first.
What does a successful domain recheck actually prove?
The invariant is that an observation authorizes only the capability it measures. A domain ownership challenge, a storefront routing check, and an assessment of mail authentication have different acceptance criteria. Model them separately, even when the onboarding screen presents them together, because a single green status encourages downstream systems to assume more than the verifier observed. A customer asking for another observation does not change those criteria.
Mail is the sharp edge of this marketplace example. RFC 7489 describes DMARC in terms of authentication results and identifier alignment: a passing, aligned SPF result or a passing, aligned DKIM result can satisfy the DMARC authentication requirement. Publishing a DMARC policy record does not demonstrate that an actual notification message will satisfy that requirement. Nor does a DMARC pass establish inbox placement. Keep the evidence label narrower than the claim the product wants to make.
For seller notifications, a proposed acceptance artifact is a controlled test message with its relevant authentication and alignment observations attached to the exact sending configuration under review. Treat that artifact as evidence about that test, not a prediction about every recipient. If the marketplace only provides storefront hosting and never sends seller-branded mail, omit the mail gate; otherwise an unrelated capability would block an otherwise valid onboarding flow.
That boundary matters operationally.
A retry system can report that it found an expected record, but it cannot manufacture evidence about a message it never evaluated.
Give scheduled retries and customer rechecks one capacity budget
Scheduled polling earns its place because a customer should not have to keep a browser open to finish onboarding. A customer-triggered recheck earns its place because the customer may know that a configuration change just happened. These are useful scheduling signals. Neither deserves a second verification implementation, a private resolver policy, or permission to bypass concurrency controls.
Use one job identity per tenant, domain, capability, and configuration generation. A manual request may advance an eligible job, subject to its cooldown; repeated clicks should coalesce with existing work. A scheduled attempt should find the same job. Workers must reject a result from an older generation before it changes activation state, including when an old attempt finishes after a customer replaces the challenge. Otherwise the queue can be perfectly reliable while the resulting authorization is wrong. In the hypothetical seller scenario, the two clicks and the scheduled attempt should converge on one eligible job. If the seller changes the challenge while that job runs, its completion belongs to the previous generation, so even a successful observation must leave the replacement configuration pending.
Make the arithmetic explicit. As a hypothetical planning case, 12,000 pending domains checked once every 300 seconds imply an average of 40 domain checks per second before customer requests, retries, or duplicate delivery. This is a workload estimate, not a benchmark. If each check performs multiple lookups, budget those separately, then reserve capacity for renewal work and other traffic that shares the resolver or worker pool. An average alone says little about a synchronized onboarding burst.
Bound the queue.
The proposed policy should include randomized scheduling, per-tenant limits, a global concurrency limit, attempt deadlines, and a finite retry window. Choose their values from measured check latency and onboarding demand rather than assuming a universally correct polling interval. Once that window expires, retain the pending state with an explicit next action instead of consuming capacity indefinitely or declaring the domain invalid forever. A later customer request can resume evaluation under the same admission rules.
For SLO purposes, separate accepted-request-to-attempt-start latency from time-to-activation after a customer edits DNS. The former is largely under the service's control; the latter includes external observations and configuration correctness. A UI can show the last observation time and next eligible check without promising a propagation deadline that the service hasn't established.
Compare the operating models by the evidence they preserve
The buy-versus-build decision belongs after the acceptance contract. A managed component can reduce the amount of verification machinery a team operates, but the team still needs to determine whether its observations support marketplace activation. Building everything gives the team more control over admission and evidence retention while making that team responsible for the worker lifecycle, stale jobs, and on-call diagnosis. These are evaluation criteria, not claims about any particular supplier.
| Operating model | Evidence contract to require | Operational responsibility to budget |
|---|---|---|
| Build the verifier and scheduler | Preserve observed result, configuration generation, and observation time | Own queue admission, lookup behavior, worker failures, and replay tooling |
| Buy verification execution; own activation | Require enough result detail to apply the marketplace's acceptance rules | Own result ingestion, freshness checks, and the activation decision |
| Buy the broader onboarding workflow | Verify that ownership, routing, and mail readiness can remain distinguishable | Own acceptance tests, integration monitoring, and an exit path for retained evidence |
Scheduled-only operation is reasonable where delayed completion fits the onboarding objective. Manual-only operation reduces unattended work, but completion then depends on someone returning to request a check. Combining them is justified when both unattended progress and customer feedback matter, provided their combined arrival rate fits the same capacity plan. The trade-off is added scheduling complexity in exchange for bounded responsiveness; repeated requests provide no independent proof that DNS changes have become visible.
Prevent duplicate work before it reaches the verifier
The following Go function expresses admission policy for a single current job. Its durations are caller-supplied policy, and its times describe service scheduling rather than DNS cache behavior. The caller must execute admission and the resulting lease update atomically; a pure function alone cannot prevent two workers from starting the same job.
package verification import "time" type Job struct { Generation uint64 NextCheck time.Time LeaseUntil time.Time LastManual time.Time } func Admit( job Job, requestedGeneration uint64, now time.Time, manual bool, cooldown time.Duration, ) bool { if requestedGeneration != job.Generation { return false } if now.Before(job.LeaseUntil) { return false } if manual { if cooldown <= 0 { return false } return job.LastManual.IsZero() || !now.Before(job.LastManual.Add(cooldown)) } return !now.Before(job.NextCheck) } On admission, the transaction records the lease and, for a manual request, updates the last-manual timestamp. Completion requires a second conditional transaction: verify the generation and lease ownership, store the observation, then either schedule another eligible attempt or transition the relevant capability. Global and tenant admission limits still apply outside this focused function. A rejected admission should return the existing job's status so that repeated clicks don't look like lost requests.
Distinguish an observed mismatch from an inconclusive attempt. RFC 7489 explicitly addresses temporary DNS errors during policy discovery; a transient lookup problem must not be rewritten as proof that a seller deliberately omitted the required configuration. Preserve enough error detail for a worker to choose the appropriate retry path, while presenting a useful customer action only when the observation supports one.
Before deployment, exercise simultaneous manual and scheduled admission, a worker that finishes after its lease expires, and a configuration change during an in-flight lookup. Assert that an old generation cannot activate a new configuration. Replay representative results through the proposed decision path before letting it change live activation state; this tests the authorization boundary that a happy-path DNS lookup leaves untouched.
Stop retries where the evidence stops
Track queue age, coalesced requests, attempt latency, inconclusive outcomes, and rejected stale completions. Break these down by capability and configuration generation when investigating an onboarding delay. A single aggregate success rate can hide a storefront-ready seller whose mail evidence is still pending, which is precisely the distinction this design exists to preserve.
This approach is unsuitable for a tool that performs one diagnostic lookup and makes no activation decision: such a tool may need neither durable scheduling nor an onboarding state machine. Conversely, recurring checks for an already active domain need a separate revocation policy; an onboarding retry deadline alone cannot decide what existing customer traffic should do after a later observation changes.
For the marketplace, the release criterion is concrete: scheduled retries and customer rechecks share bounded work, stale results cannot authorize a changed configuration, and each readiness claim points to evidence for that capability. Deliverability remains a claim that requires mail evidence beyond a DNS verification badge.
References
The standards reference supports the DMARC authentication, alignment, policy-discovery, and temporary-DNS-error distinctions above. The queue policy, planning example, and activation model are proposed engineering choices.
Sources
- RFC 7489, Domain-based Message Authentication, Reporting, and Conformance, especially Sections 3.1, 4.2, and 6.6: https://datatracker.ietf.org/doc/html/rfc7489