DEV Community

nathanielbrooks0360
nathanielbrooks0360

Posted on

School Domain Cutovers: Debug Pending Tenants Through Verification Queue Evidence

The outcome is a classroom hostname that can move to a new destination and still move back. The least complex design worth considering is a durable verification queue with an observable worker and an explicit owner for each zone change. Consider a proposed alert: an onboarding-age SLO is breached, and the on-call sees custom domain tenants stuck in pending while no recent verification attempts appear. Students have not gained access through their new hostname, but the dashboard still offers the unhelpful instruction to wait.

TL;DR: When custom domain tenants remain pending and a scheduled verification job may have stopped, first establish whether verification attempts are actually happening. Separate missing execution from an executed check that found unsatisfied DNS evidence. For an edtech hostname cutover, keep the old serving configuration available until the new destination passes the agreed checks, and assign the rollback action to whoever can change the zone.

Pending is insufficient evidence.

The operational angle here is change sequencing: a school-owned zone and a platform-owned zone can expose the same pending label while requiring different people to perform the next action. The following queue fields, thresholds, and example are a proposed operating design, not a report of an incident or a description of a particular service.

What should alert before custom domain tenants get stuck pending?

Work backward from that page. The user-visible symptom is an unfinished onboarding transition; an earlier signal would be due verification work accumulating without completed attempts. A scheduler heartbeat helps establish that scheduling ran, but the evidence needed to diagnose the stall is whether an eligible hostname was attempted, what the attempt concluded, and whether that conclusion reached durable state. Treat those as separate observations.

For each queued hostname, record a due time, the last attempt start, the last attempt completion, and the last recorded outcome. Maintain scheduler activity separately. In this design, a scheduler that wakes up without dispatching work cannot satisfy the worker-progress check, and a worker that starts a lookup without persisting its result cannot satisfy the completion check. This costs more instrumentation than a single heartbeat. It also gives the on-call a concrete boundary to investigate.

Choose an onboarding SLO around the transition the platform controls. Time awaiting a school administrator's DNS change should be visible as customer action required, while time spent waiting for the platform to execute an eligible check belongs in the platform's processing objective. Keep total elapsed onboarding time visible too; excluding customer waiting from an internal SLO should not erase the school's experience. Don't let the accounting hide the wait.

A success ratio without work age is a weak instrument here: if no attempt finishes, a completion-only view supplies no fresh evidence about the oldest waiting hostname. Display oldest due-work age alongside completed attempts and scheduler activity. In the proposed alert, require eligible work to exist before interpreting silence as a processing failure.

An empty queue should be quiet.

Trace the pending state through execution and evidence

Start with one affected hostname. Ask for its next due time and last durable attempt, then follow that attempt through dispatch, lookup, evaluation, and state persistence. This is a diagnostic sequence, not an instruction to change a school's DNS record whenever onboarding stops moving.

If the due time has passed and there is no attempt, investigate the scheduling and dispatch boundary. If dispatch exists but no worker start follows, inspect the handoff. If an attempt starts but never completes, inspect the worker's execution boundary. If a completed result exists while the tenant still displays pending, inspect how that result updates the tenant state. Each branch requires evidence from the preceding stage; a green scheduler indicator cannot establish that the last stage happened.

Only after establishing that a check actually executed should DNS evidence drive the next action. Preserve distinct outcomes for a lookup failure, an answer that does not meet the configured requirement, and evidence that satisfies it. A retryable execution failure should retain enough context to investigate without being presented as proof that the customer entered the wrong value.

RFC 7489 offers a useful, narrow standards boundary. Its DMARC policy-discovery procedure uses DNS TXT records and distinguishes conditions in policy discovery; it does not define a general custom-hostname ownership or onboarding protocol. A DMARC record is therefore no substitute for the specific verification evidence your hostname workflow requires. Borrowing an email-policy lookup as an ownership test would change the question being answered. See References for the source.

The diagnostic trap is concrete: asking a school to edit its zone again when the platform has not performed another check adds a second change to investigate while leaving the missing execution unresolved.

Restore observable progress first. Then evaluate the actual evidence.

Make the instrumentation describe unfinished work

Use two clocks in the alert design: the age of the oldest due item and the time since a worker completed an attempt. The first describes user-impacting backlog; the second helps identify lost progress. Keep individual hostnames in restricted diagnostic records, and use aggregate measurements for the paging decision.

The Go example below implements only that proposed decision predicate. Its limits are configuration inputs, not recommended defaults or a claim about DNS timing. Run it against a consistent queue snapshot; a zero completion timestamp means that no completion has been observed in the scope being monitored.

package verification

import "time"

type Progress struct {
    DueCount       int
    OldestDue      time.Time
    LastCompletion time.Time
}

func Stalled(p Progress, now time.Time,
    maxDueAge, maxSilence time.Duration) bool {
    if p.DueCount <= 0 || p.OldestDue.IsZero() {
        return false
    }
    if now.Sub(p.OldestDue) < maxDueAge {
        return false
    }
    return p.LastCompletion.IsZero() ||
        now.Sub(p.LastCompletion) >= maxSilence
}
Enter fullscreen mode Exit fullscreen mode

A completion timestamp alone still has a limitation: other work can complete while one hostname remains stuck. Keep a separate alert on the oldest due-work age even when aggregate throughput looks healthy. Route that alert as excessive delay; route the combined predicate as suspected loss of progress. Different evidence deserves different incident language.

Capacity planning belongs beside this instrumentation. In a hypothetical onboarding wave of 120 school hostnames with a target of one attempt per hostname every 60 seconds, the planned demand is 2 attempts per second before retries. Those numbers describe the example workload only. Size worker concurrency using measured attempt duration, allow for retries, and check whether the queue drains inside the processing objective; a scheduler can be functioning exactly as configured while workers lack enough capacity to satisfy the target.

Test the observation path before depending on it. In a controlled environment, stop dispatch while due work exists, stop worker completion separately, and submit a check whose evidence does not satisfy the configured requirement. The expected observations should distinguish all three. Also exercise an empty queue, since a page caused by having nothing to verify is an expensive instrumentation defect.

Zone ownership determines the cutover and rollback action

Use a hypothetical school hostname, classroom.school.example, moving between an old and a candidate destination. Keep the old destination available through the acceptance window. Define that window around the classroom access checks the team has agreed to observe, rather than treating a pending-to-verified database transition as proof that students can use the new destination.

For a customer-owned zone, the school administrator owns the DNS edit and the corresponding rollback edit. The platform owns its verification execution and the evidence it reports. For a platform-owned zone, the platform can assign both actions to its own change procedure. Write this assignment before scheduling the cutover; an operator cannot promise a reversal time for a zone they cannot change.

Authority is the constraint.

Decision Buy a managed verification capability Build the verification workflow
Customer-owned zone Require observable attempts and actionable customer status; the zone edit still needs a school owner. Implement the same evidence and handoff explicitly, including who requests a reversal.
Platform-owned zone Require a way to coordinate verification with the platform's cutover procedure. Own the change ordering, state persistence, and reversal procedure together.
On-call load Evaluate whether attempt history and unfinished work are inspectable. Budget engineering time for instrumentation, retries, and recovery tests.
Portability and ongoing cost Evaluate state export and recurring operational commitments. Budget maintenance and the cost of carrying the workflow through future changes.

This is a buy-versus-build trade-off about operational control, with no universal winner. A managed capability is a poor fit for this workflow if the team cannot obtain the evidence needed to explain a stall; a self-built workflow is a poor fit if the platform team cannot maintain the recovery path. Neither choice transfers authority over a customer-owned zone.

Before accepting new traffic, verify the destination against the agreed classroom access checks and confirm that the rollback owner can still act. Record the previous configuration and the acceptance decision. If acceptance fails, use the designated reversal procedure and verify its outcome; changing a desired value is only one step in establishing that the hostname is usable again.

Set thresholds against the cost of a needless page

Return to the opening alert. It should give the responder an affected work scope, oldest due-work age, last completed attempt, and the zone owner for the cutover. That makes the first action inspectable: restore processing, investigate a particular attempt, or request a customer-owned change.

Do not choose the silence threshold merely because the scheduler has a nominal interval. Account for observed attempt duration, queue bursts, and the processing SLO. A threshold that repeatedly pages during a planned school onboarding wave spends on-call attention without shortening a stall; a threshold that tolerates silence beyond the processing objective discovers the problem through teachers. Review the alert against controlled failures and ordinary workload before relying on it during a cutover.

The rollback plan needs the same discipline. Keep the previous destination usable, make zone authority explicit, and demand evidence of verification progress before telling a school to wait. The false-positive cost is a needless page and an interrupted operator; if that page also prompts an unnecessary DNS edit, it creates another change to unwind.

References

The standards reference below concerns email authentication policy discovery. Its scope is deliberately narrower than custom-domain tenant verification.

Further reading

Top comments (0)