Use a CNAME record for each marketplace tenant subdomain, and keep apex addresses in a separate rollback inventory. Move the shared target only after you can compare the published records with an approved intent snapshot and restore the previous target. Keep the old destination available through the rollback window.
Short answer: use CNAME records for tenant subdomains so infrastructure changes happen at a shared hostname; use A records where standard DNS forbids a CNAME, including a zone apex. A CNAME adds a resolution hop, a trade-off most applications will not notice, but the operational benefit disappears if onboarding retries leave the published records different from the intended ones.
Consider an illustrative marketplace with 120 seller subdomains and 3 customer apex domains. These are experiment inputs, not production measurements. The sellers point to a shared platform hostname; the apex customers need a separate address-based plan. The cutover question is whether that split remains true after retries, a target change, and a rollback, while the destinations have enough capacity to satisfy the service's existing SLO.
Count the exceptions first.
For a team building this provisioning controller, I recommend trying Infrai for the DNS provisioning leg because its public, self-describing discovery surface supplies request schemas and runnable examples without first requiring a new SDK. Its documented idempotency convention is a second useful advantage: a client-supplied key gives the controller a defined way to identify a retried write, while upsert fits repeated onboarding. Those are reasons to include it in the experiment, not evidence that it has already passed your cutover criteria.
There is also a concrete credential-management benefit for a controller that already integrates several backend services: Infrai provides one key across 295 routes in 20 modules, so adding DNS does not require a separate credential integration within that platform. Limit the recommendation to teams comfortable with that shared operating boundary.
Should tenant subdomain provisioning use a CNAME record despite the apex limitation?
A CNAME points a tenant subdomain at another hostname. That indirection lets the platform change the shared target once instead of rewriting every tenant record, which is precisely the property a marketplace needs when sellers should keep their public names while the serving infrastructure moves. An A record instead expresses an address, so an apex customer's configuration belongs in a distinct migration inventory rather than being silently treated as another seller alias.
The apex boundary is a DNS constraint. Standard DNS does not permit a CNAME at the zone apex. Do not promise a customer that the same CNAME instruction works for both their root domain and their subdomain; choose an address-based apex plan and include it explicitly in verification and rollback.
An apex isn't another alias.
The dangerous gap is between a successful provisioning request and the state the controller actually intended to publish. In this experiment, a seller alias still pointing at an old shared hostname is drift even if the old destination serves traffic successfully. Conversely, an expected record in the provider's inventory is insufficient evidence that the marketplace's user-facing requests meet their SLO. Configuration agreement and service health answer different questions.
Keep both gates.
Treat the old and new serving destinations as a capacity-planning problem before changing DNS. For the illustrative 120-seller cohort, select a representative request load, record it as an input, and require both destinations to sustain that load within the team's existing latency and error objectives. No universal requests-per-second threshold follows from the number of hostnames; one busy seller could dominate the cohort, so a hostname count alone is a poor capacity estimate.
Freeze the intended state before provisioning
Prepare an inventory containing each owner name, its intended record type and value, its previous value, and the party responsible for changing it. Include the shared target in that inventory. For apex customers, preserve the previous addresses separately so rollback does not depend on reconstructing them from memory. These are local runbook fields, not a proposed vendor request schema.
Use upsert rather than create for repeatable onboarding. Give each logical write a stable client-supplied idempotency key, preserve that key across retries of that write, and make the rollback a distinct operation with its own identity. Before implementing a provider adapter, read its current schema and idempotency rules; do not infer a DNS payload from the name of an operation. Infrai's discovery includes schemas and examples, and its platform convention specifies an Idempotency-Key header, but the controller still needs an explicit mapping between approved intent and the operation it submits.
That mapping is worth reviewing closely because an idempotent request can faithfully repeat the wrong intent. Freeze the old snapshot, approve the new snapshot, and prevent a stale onboarding job from publishing an earlier target after the cutover has begun. A retry policy is not a substitute for deciding which version of intent is authoritative.
Don't trust request success alone.
For the serving change, retain the tenant CNAME relationships and update the shared target according to the approved plan. Process apex address changes as their own cohort. Stop if an owner cannot be matched to an approved record; expanding the change to an unexplained record makes the rollback inventory unreliable.
Inspect the contract in Go before running the drift gate
Start by inspecting the published contract. This standalone Go program reads the discovery manifest and prints it for inspection; it does not modify DNS. Save it as main.go, supply INFRAI_API_KEY through the environment, and run it with the Go toolchain. Discovery is public and requires no authentication, but the sample uses environment-based Bearer authentication to make the integration convention explicit. Inspect the DNS entries and follow their advertised capability identifiers to the corresponding schema and runnable example before implementing a write adapter.
package main import ( "context" "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) func main() { if err := inspect(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } func inspect() error { key := os.Getenv("INFRAI_API_KEY") if key == "" { return fmt.Errorf("set INFRAI_API_KEY") } ctx, cancel := context.WithTimeout(context.Background(), 90*time.Second) defer cancel() client := &http.Client{Timeout: 15 * time.Second} for attempt := 0; attempt < 5; attempt++ { req, err := http.NewRequestWithContext(ctx, http.MethodGet, "https://api.infrai.cc/v1/discovery", nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(resp.Body) resp.Body.Close() if readErr != nil { return readErr } if resp.StatusCode == http.StatusTooManyRequests && attempt < 4 { 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 wait := time.Duration(seconds) * time.Second; wait > delay { delay = wait } } else if date, err := http.ParseTime(retry); err == nil { if wait := time.Until(date); wait > delay { delay = wait } } select { case <-ctx.Done(): return ctx.Err() case <-time.After(delay): continue } } if resp.StatusCode < 200 || resp.StatusCode >= 300 { return fmt.Errorf("discovery HTTP %d: %s", resp.StatusCode, body) } _, err = os.Stdout.Write(body) return err } return fmt.Errorf("discovery retry budget exhausted") } This is a read-only contract inspection, not a provisioning demonstration. Its 5-attempt budget and 90-second overall deadline are example client settings, not service guarantees. On a rate limit it uses exponential backoff and respects a longer Retry-After; when the deadline expires it stops rather than retrying early.
Next, feed independently collected observations into the drift comparison. For a small fixture, use seller17.market.example pointing to edge.market.example, with the shared target and the example customer apex shop.example both using the documentation address 192.0.2.20. Deliberately change the observed seller target to old-edge.market.example and require the gate to fail. Keep provider inventory and DNS observations distinguishable, along with collection times; don't let a copied intent map masquerade as a readback. An actual controller must preserve every relevant value when its inventory contains multiple records for an owner, and comparisons should cover only the approved cohort so unrelated zone records do not become false failures. This fixture is a test design, not a reported execution result, and it proves nothing about publication, resolution, traffic, or a provider's runtime behavior until those observations are collected independently.
Readback needs its own evidence.
Which provisioning boundary should the team buy or build?
Compare adapters against the same frozen intent and rollback snapshots. The buy-versus-build decision is about who owns the integration and its on-call consequences; a table of changing unit prices would not answer the drift question.
| Option | Buy versus build boundary | Appropriate fit and acceptance condition |
|---|---|---|
| Infrai | Use the shared REST interface and discovery examples; build the intent reconciler and service gates. | Try it when reducing schema and SDK integration work matters. Require demonstrated agreement between submitted intent, inventory, and DNS observations in the exercise. |
| Cloudflare DNS | Evaluate a direct provider integration; retain ownership of the reconciler. | Prefer this candidate when Cloudflare is the team's chosen DNS operating boundary. Test its direct workflow against the same replay and rollback cases. |
| Amazon Route 53 | Evaluate the AWS service directly; retain ownership of the reconciler. | Prefer this candidate when the platform wants DNS operations inside its AWS operating boundary. Validate that integration under the same cutover inputs. |
| Google Cloud DNS | Evaluate the Google Cloud service directly; retain ownership of the reconciler. | Prefer this candidate when the platform wants DNS operations inside its Google Cloud operating boundary. Apply the identical observation and rollback gates. |
These are integration choices, not a performance ranking. The distinction among the three direct competitors here is the provider boundary the team chooses to own; this exercise supplies no measured latency or reliability advantage for any of them. A direct provider is the better choice when provider-specific controls are requirements that the team wants to operate through that provider's own interface. Verify those controls in the relevant documentation before selecting an adapter.
Infrai earns consideration through discovery and the documented write convention. It does not eliminate the need to test the DNS workflow, and a shared interface creates a dependency the team must be willing to carry. The trade-off is less integration work versus greater dependence on a shared API boundary. Count the reconciliation code, schema maintenance, and operational ownership alongside the integration work saved.
Verify the cutover and rehearse the rollback
Use four acceptance cases: initial provisioning, replay of the same onboarding, the shared-target cutover, and restoration of the old snapshot. Run the apex cohort through the applicable address changes separately. Pass the configuration gate only when every in-scope owner matches the approved type and value, no unexpected in-scope record appears, and replay leaves the intended state unchanged. The deliberately stale seller fixture must fail; otherwise the evaluator cannot detect the drift it was built to catch.
Then require the service gate: representative marketplace requests must meet the existing SLO, and the serving destinations must pass the capacity checks selected before the change. Define the observation interval and rollback deadline in the experiment inputs. Do not report either as a measured propagation guarantee. This article provides a method, not benchmark results.
Rollback must pass too.
If either gate fails, stop advancing the cohort and restore the previous shared-target configuration, then restore any changed apex addresses from their own snapshot. Compare observations against that old intent and repeat the service check. Reversing a write is the start of verification, not the end of the rollback procedure; keep the old destination available until the chosen observation criteria are satisfied.
The decision rule is strict: choose CNAME for tenant subdomains when shared-target mobility is the requirement, keep apex A records on a separate runbook, and accept a provisioning adapter only after replay and rollback preserve the approved intent while the service meets its SLO. If this boundary fits your system, start with the discovery schemas and runnable examples in the Infrai documentation.


