Skip to content
Tech Interview Prep
Technical interview guide

Golden Paths & Paved Roads

The officially supported, easy default way to build and deploy: that's still possible to deviate from when genuinely needed.

Minutes to read
4
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed
Relevant for
Platform Engineer

Scope: AWS Internal Developer Platform Prescriptive Guidance, Microsoft Platform Engineering guidance, Google Cloud platform engineering guidance, and Backstage stable documentation current 2026-08-31.

Interview Q&A

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

25 questions

Q&A-3

Define the contract of a paved road.

Answer

A paved road's contract is the versioned set of promises the platform makes to a workload that adopts it, plus the obligations the workload takes on in return. Four parts: interface (what you must expose), guarantees (what the platform will hold to), ownership (who is paged for what), and exit (how you leave). If a clause can't be measured or enforced, it's a documented default, not a contract term.

Assumptions: an internal platform, one paved road per workload class, and the contract versioned like an API so consumers can pin to it.

ClausePlatform promisesConsumer owesEnforced by
InterfaceHTTP on :8080, /healthz, /metrics, OCI image, config via envconform to those endpointsadmission webhook rejects non-conforming manifests
Guaranteesp99 request latency 300 ms, 99.9% monthly availability, 30-day log retentionemit RED metrics; no >2x traffic spike without noticeSLO burn-rate alerts
Ownershipplatform on-call for road defects, 4 h responseworkload owner on-call for their apppager routing rules
Lifecycle12 months support per contract major version, 6 months deprecation noticeupgrade inside the windowversion pinning plus expiry warnings
Exitconfig and data export in documented formatsnoneoff-road checklist

Loose versus strict. A strict contract (pinned base image, mandatory sidecar, fixed ingress) buys uniform SLOs and one upgrade path, and costs you every workload that doesn't fit: a GPU batch job needing an 8-hour runtime gets rejected at admission. A loose contract (platform supplies networking only) buys adoption but you can't promise an SLO you don't control. The rule is to specify only what you can measure and enforce, and leave the rest as defaults. Over-specification has a price: a contract with 40 mandatory clauses typically ends up with 15–20% of teams on waivers, and a road most teams are excused from isn't paved.

Failure modes.

  1. No contract. Every team invents its own deploy path; the platform can't page anyone and onboarding runs on Slack for weeks.
  2. Contract ignored. Teams go off-road. Detect it by inventory drift: diff the road registry against the cluster API. More than ~10% of running workloads unregistered means the road is failing, not the teams.
  3. Contract drifts from reality. Docs claim p99 300 ms; measured is 900 ms. Detect by comparing published guarantees to measured SLOs monthly: a stated guarantee violated two months running is stale and must be renegotiated or fixed.

Worked check. A team migrates a Java service. The contract's startup budget is 5 s to a 200 from /healthz, base image pinned to JRE 21. Their service warms in 12 s. Trace: admission passes (image conforms), the readiness probe fails at 5 s, so the rollout never completes; the liveness probe shares the budget, kubelet restarts the container, and it lands in CrashLoopBackOff. The deciding clause is the startup budget: they either add a warmup endpoint or negotiate a 15 s budget for their workload class. That's the contract working: it surfaced the mismatch before production traffic did.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-1

Design a golden path for a new HTTP service.

Answer

A golden path is a paved road, not a mandate: one supported way to get a new HTTP service from an empty repo to production, with the platform team owning the road and the service team owning the car. I'll assume a mid-size org: 30–60 backend services, Kubernetes on EKS 1.29, Go and Java as the two blessed runtimes, a platform team of about six. If you're a three-person startup, the golden path is one Dockerfile and a deploy script; the machinery below is not worth it.

The core answer. Pick one runtime and pin it. For Go that's Go 1.22, net/http, a distroless base image, listening on 8080. The scaffolder asks six fields (owner, system, data class, exposure, SLO, cost center) and nothing else, because every extra field is a reason a team forks the template. It generates a repo with a working main.go, a Dockerfile, and a CI workflow; CI runs go build, go test -race, and a Trivy scan, then cosign signs the image keyless via the CI OIDC token. Deployment is an Argo Rollouts canary, 5% → 25% → 100%, gated on Prometheus error rate. Identity is an IRSA role scoped to one S3 prefix, not a shared credential. Observability ships as four golden-signal dashboards and two alerts, so the on-call engineer starts with signal instead of a blank Grafana.

StageConcrete defaultArtifact produced
Intent6-field Backstage formcatalog-info.yaml
RepoGo 1.22 template, distrolessmain.go, Dockerfile, CI workflow
Buildgo build, go test -race, TrivyOCI image + SBOM
Signcosign keyless (OIDC)registry signature
IdentityIRSA role, one S3 prefixservice-account annotation
DeployArgo Rollouts canaryRollout CR
ObservePrometheus + Grafanadashboard, 2 alerts

Why the probes matter. The single most common golden-path bug is tying readiness to a downstream dependency. Liveness must check only the process; readiness checks whether it can serve.

Go
// Go 1.22, net/http
mux.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(http.StatusOK) // liveness: process is up, no dependencies
})
mux.HandleFunc("/readyz", func(w http.ResponseWriter, r *http.Request) {
    if !db.PingContext(r.Context()) {
        http.Error(w, "db unreachable", http.StatusServiceUnavailable)
        return
    }
    w.WriteHeader(http.StatusOK)
})

If /healthz pings the database, a brief DB blip restarts every pod at once and turns a degradation into an outage. Detect it by correlating pod restarts with dependency latency on the same dashboard.

The canary arithmetic. A 99.9% monthly SLO gives 43.2 minutes of error budget. At 100 rps total, a 5% canary for 10 minutes sees 30,000 requests; a version with a 2% error rate produces 600 errors, comfortably above a 1%-over-5-minutes alert. That's why the canary is 10 minutes and not 60: long enough to detect, short enough to stay inside budget.

Failure modes and how you see them. Template drift: teams fork because a field is missing, and the platform loses leverage. Watch the share of services on the current template version. Stuck rollouts: nobody watches the canary, so it sits at 5% for a week. Alert on rollout age. Exception-route creep: the escape hatch becomes the default. Track exception rate as a first-class metric, and if it exceeds ~10%, the path is wrong, not the teams.

Trade-offs. A golden path beats a free-for-all because it makes the secure, observable option the easy one, and it beats a hard mandate because a mandate on a bad path just produces shadow infrastructure. It's the wrong tool for genuinely novel workloads (stateful databases, GPU jobs, batch pipelines) where the constraints differ enough that a paved road becomes a cage. Say that out loud in the interview: the golden path is a default with an exception route, and the exception rate is the health metric for the whole program.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-2

Choose which engineering journey to pave next.

Answer

Assumptions I'd state before answering: ~400 engineers, ~180 services, a 9-person platform team, quarterly planning, and a mandate to cut lead time rather than ship a specific tool. The figures below are illustrative for a company that size: replace them with your own before quoting them.

The answer: score each candidate journey on reach × frequency × cost of the current path, divide by build cost, and gate on whether the dependencies already exist. Pave the highest-scoring one you can ship end-to-end inside a quarter. In the worked case below that's service bootstrap, not schema migration: even though migration has the scarier tail.

JourneyReachFrequencyCost of current pathBuild costPayback
A. New service → first prod deploy40 services/yr, 12 teams40/yr1,944 eng-h/yr960 eng-h (2 eng × 1 quarter)~7 months
B. Schema migration on shared Postgres180 services1,100/yr~1,690 eng-h/yr, plus 44 replica-lag incidents~1,400 eng-h (needs DBA + platform)~10 months
C. On-call triage60 engineers on rota9,600 pages/yr~600 eng-h/yrn/a: this is alert tuning, not a paved pathfails the test

The arithmetic for A. Today a new service takes a median 9 working days from repo creation to first prod deploy, of which ~2.5 days is engineer time: 40 × 2.5 = 100 days = 800 h. On top of that the platform team spends 22 h/week on bootstrap tickets: 22 × 52 = 1,144 h. Total 1,944 h, or 1.1 FTE-years at 1,800 h/yr. A paved path targeting 0.5 day per service (160 h) and 4 h/week of platform toil (208 h) lands at 368 h: a saving of 1,576 h/yr. Two engineers for a quarter is 960 h, so payback is 960 / 1,576 × 12 ≈ 7.3 months.

Why B loses despite the bigger tail. Its hard cost is 1,100 migrations × 20 min of DBA review = 367 h, plus 44 lag incidents × 6 h × 5 responders = 1,320 h, totalling ~1,687 h: roughly the same as A, at a longer payback. The deciding criterion is what kind of win you're buying: A is throughput, B is tail-risk reduction. If you carry an SLO or a compliance commitment on migration safety, B wins anyway and you eat the extra quarter. Otherwise take A and buy B's guardrail cheaply: a migration linter in CI is a two-week spike, not a quarter.

C fails the test outright. 9,600 pages/yr at 38% actionable leaves 5,952 non-actionable pages, ~6 min of context switch each, so ~595 h/yr. Real, but the fix is deleting and re-thresholding alerts, not building a path. Paving it would be building infrastructure around a config bug.

Alternatives to building. Backstage software templates plus a Terraform module registry gets you most of A in about six weeks with one engineer. Build custom only if your compliance model can't be expressed in a template: for example, if every service needs a signed attestation the scaffolder can't produce. And the honest third option is doing nothing: if fewer than ~10 teams will use the journey in a year, or the variance between teams is the value (ML training pipelines, one-off backfills), a paved path is a tax on the teams that were fine.

What breaks, and how you'd see it.

  • Two paths forever. Teams keep the old route. Track the share of new services created from the template; below 70% by the second quarter means the template is missing a step they need, and you're now maintaining both.
  • The template ossifies. Count overrides per service. If more than 30% override the same field, the default is wrong, not the team.
  • You moved the bottleneck. If the paved path adds a platform review, watch its queue time; p95 above one day means the platform team is the constraint again.
  • The metric gets gamed. Elapsed time falls because teams create the repo later. Pair lead time with deploys per service per week, or you'll ship a dashboard that lies.

What would change my answer: a migration incident in the last quarter, or a compliance deadline, flips A and B. Nothing else in this list does.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-15

Design path support for multiple workload classes.

Answer

What I'd say first

"Path" here means a golden path: a versioned template that scaffolds a repo and wires CI, identity, deploy and telemetry so a team ships without re-deciding platform concerns. Assumptions: Kubernetes on one cloud, Terraform for infra, GitHub Actions for CI, ~200 workloads, platform team of five. The design is three composable layers (base, class, instance) not one template with a flag per feature.

Layer 1: base (every workload). Repo scaffold; CI that builds, tests, emits an SBOM and signs the image (cosign); OIDC workload identity so no static cloud credentials exist; OpenTelemetry SDK emitting RED metrics; a Conftest/OPA gate in CI. Identical for all classes: this is where the leverage is.

Layer 2: class. One module per workload class, and the class selects the Kubernetes primitive rather than a boolean.

classprimitivescalingfirst failure signal
stateless serviceDeployment + Service + HPACPU/RPSp99 latency; HPA pinned at maxReplicas
workerDeployment, no Service + KEDAqueue depthqueue age; consumer lag
scheduled jobCronJob, concurrencyPolicy: Forbidnonemissed schedule; job duration
statefulStatefulSet + volumeClaimTemplatesmanual/operatorPVC Pending; replica not Ready
librarypublish only, no deployn/adownstream build break
regulatedstateless + deny-all NetworkPolicy, signed provenance, residency pinas statelesspolicy gate rejection

Layer 3: instance. Team-owned values: replicas, resource requests, env vars, secret refs. Nothing structural.

Composition: a Backstage template renders the repo with a platform.yaml pinning layer versions; a single Terraform workload module reads class and composes the matching class module.

YAML
# platform.yaml — pinned, machine-checked
apiVersion: platform/v1
class: worker          # enum: service|worker|cron|stateful|library|regulated
layers:
  base:  v3.4.1
  class: v2.1.0
instance:
  replicas: 3
  resources: { requests: { cpu: 250m, memory: 512Mi } }

Trade-offs. Three options: (a) one mega-template with booleans, (b) a fully separate path per class, (c) composable layers. (a) fails because valid combinations are unknowable: 12 booleans is 4096 states and no test matrix covers them. (b) duplicates the base layer six times, so a base-image CVE fix needs six PRs. (c) is the pick. The deciding criterion for a new path: divergence is structural when the deploy primitive or lifecycle differs (Deployment vs StatefulSet vs CronJob; a library has no runtime). If only values differ, it's a parameter, not a path.

Failure modes and detection.

  • Flag sprawl: count conditional branches in the template; alert when a class module exceeds ~5 booleans.
  • Version skew: teams pin old layers, so a base-image CVE fix doesn't propagate. Detect with a fleet query over platform.yaml pins; report the share of workloads on the current base.
  • Snowflake forks: a repo diverges from the template. Detect by comparing the rendered-output hash against the template's expected hash in CI.
  • Class mis-selection: a stateful workload deployed as stateless loses data on reschedule. Detect by flagging pods that write locally but mount no PVC.

Arithmetic. 6 classes × 3 layers = 18 maintained modules, but only the 6 class modules change often; the base is one. Against the mega-template's 2^12 = 4096 untested states, that ratio is the whole argument.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-16

Design a golden path for an event-driven service that consumes from a queue or topic, covering idempotent processing, dead-letter handling, retry and backpressure, and how it differs from the synchronous HTTP path.

Answer

What I'd say in the first 90 seconds

Assume a service consuming from SQS or Kafka, at-least-once delivery, and a golden path that scaffolds the consumer, its idempotency store, DLQ wiring and backpressure defaults. One decision drives everything else: the broker will redeliver, so every handler must be idempotent, and the idempotency record has to commit atomically with the effect it guards. The HTTP path has the same duplicate problem, a client that times out on a slow POST retries it, but there the caller is blocked and owns the retry budget, and it gets a status code back. Here nobody is waiting, so retries, poison messages and lag are the consumer's problem and have to be surfaced as metrics.

Idempotency: commit the key with the effect

Use a producer-set key (a UUID, not a hash of the payload: two legitimate events can share a payload). Write it in the same transaction as the business write:

Python
# Python 3.12, psycopg 3
import psycopg

def handle(conn, msg):
    key = msg.headers["idempotency_key"]        # stable across redeliveries
    try:
        with conn.transaction():
            conn.execute(
                "INSERT INTO processed_messages (key, processed_at) VALUES (%s, now())",
                (key,),
            )
            apply_effect(conn, msg)             # business write, same tx
    except psycopg.errors.UniqueViolation:
        return "duplicate"                      # already applied -> ack
    return "processed"

Trace it the way the broker drives it:

  • First delivery: INSERT succeeds, effect applies, COMMIT. Ack.
  • Crash inside the transaction: rollback, so neither the key nor the effect exists. Redelivery reprocesses cleanly.
  • Crash after COMMIT: redelivery hits the unique constraint, returns duplicate, acks. No second effect.

The tempting version (check the store, process, then write the key) has a window between process and write. A crash there means the redelivery applies the effect twice. That ordering is the bug, not a detail.

For effects you can't put in your database (charging a card, sending mail), write a PENDING row first, call the provider with its idempotency key, then mark DONE; a sweeper reconciles rows stuck in PENDING past a few minutes.

Retry and DLQ

SQS: a redrive policy with maxReceiveCount (3–5 is typical) moves the message to a DLQ after N receives. Visibility timeout must exceed worst-case processing time, or a second consumer picks up the same message while the first is still working. Kafka has no DLQ: retrying in place blocks the partition, so route to retry topics with increasing delay (Spring Kafka's @RetryableTopic) and a terminal DLQ topic. DLQ depth is the alert; redrive is only safe because handlers are idempotent.

Backpressure

SQS: cap concurrent pollers and messages in flight. Kafka: pause()/resume() partitions when downstream latency crosses a threshold, and cap max.poll.records. The concrete failure to tune against: if a poll loop takes longer than max.poll.interval.ms (default 300000 ms in Kafka 3.x/4.x), the consumer is evicted from the group, the partition rebalances, and the next consumer reprocesses the same batch. A duplicate storm that looks like a traffic spike.

AspectHTTP pathEvent-driven path
DeliveryAt-least-once in practice: client retries on timeout or 5xxAt-least-once: broker redelivers on nack, visibility timeout, or consumer crash
Who retriesCaller, synchronously, with its own budgetConsumer/broker, asynchronously, with backoff
IdempotencyRequired for non-idempotent operationsRequired for every handler
Error signalStatus code to the callerDLQ + metrics; nobody is waiting
BackpressureCaller timeout, LB 503, connection limitsPrefetch/concurrency cap, partition pause, lag
ObservabilityRequest logs, latency percentilesConsumer lag, DLQ depth, retry count

Failure modes to name

Key collision from hashing payloads: use UUIDs. DLQ overflow: alert on depth, not on rate. Retry storm: jitter plus a hard cap on attempts. Rebalance loop: processing time creeping past max.poll.interval.ms. Exactly-once needs Kafka transactions or a transactional outbox; the golden path defaults to at-least-once plus idempotency because that combination works across brokers.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-17

Design the self-service interface through which engineers instantiate a golden path, the CLI or developer portal surface, covering how parameters are discovered and validated, how failures are surfaced to the caller, and how the interface stays in step with the underlying template.

Answer

The interface is a projection of the template, not a second implementation of it.

In Backstage the template's spec.parameters block is JSON Schema; the portal form is rendered from it, and any CLI should be generated from the same document in CI. The moment a flag or a form field is hand-maintained, it drifts from the template within a quarter and callers get a parameter the scaffolder silently ignores.

yaml apiVersion: scaffolder.backstage.io/v1beta3 kind: Template metadata: { name: http-service, title: HTTP service } spec: parameters: - title: Identity required: [name, owner] properties: name: type: string pattern: '^[a-z][a-z0-9-]{2,40}$' description: Repo and service name; becomes the DNS label. owner: type: string description: Backstage group that receives on-call. ui:field: OwnerPicker tier: type: string enum: [tier1, tier2, tier3] default: tier3 description: tier1 gets paging and a 99.95% SLO. steps: - id: fetch action: fetch:template input: { url: ./skeleton, values: { name: '${{ parameters.name }}' } } - id: publish action: publish:github input: { repoUrl: 'github.com?repo=${{ parameters.name }}&owner=acme' } output: links: [{ title: Open repo, url: '${{ steps.publish.output.remoteUrl }}' }]

Discovery is the schema plus a dry run. Every property carries title, description, default and examples; defaults are the safe common case so the happy path is "accept and go". Secrets are never free-text parameters: the template takes a secret path and the step resolves it. --dry-run prints the file tree and the cloud resources that would be created, which is what lets a caller validate intent before anything exists.

Validation runs at three layers, cheapest first:

layerwhenexamplewho fixes it
schemaon submitname fails ^[a-z][a-z0-9-]{2,40}$caller, field-level error
policyplan timeOPA denies registry ghcr.io/team-paymentscaller, with an exception route
generationafter scaffoldgenerated repo fails make buildplatform, template is defective

Failures surface by class, not as one "something went wrong". Caller error → exit 2, the offending field and the constraint it broke. Policy denial → exit 3, the rule name, the reason, and where to request an exception. Platform error → exit 4, a correlation ID, retryable, and an explicit statement of partial state.

A trace: platform new service --name payments-api --owner team-payments validates against the schema, then policy rejects the default registry. exit 3: policy image-registry: registry ghcr.io/team-payments not in allowlist; exception: platform-exceptions. No repository is created, and the task page shows the same message with the step that failed.

Staying in step is a CI job: regenerate the CLI from template.yaml, fail if the diff is non-empty, and contract-test that every schema property is reachable from both surfaces. Pin the template version into the generated repo's metadata so upgrades are traceable, and deprecate a parameter with a warning for one minor version before removal.

Two failure modes to name. Partial creation (repo published, CI not wired) so steps are idempotent and every run returns a task ID the caller can re-run. Over-parameterization: each new flag is a fork; if callers keep asking for one, that is a signal for a new path, not a new option.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-12

Design ownership metadata for generated services.

Answer

Core answer

Assume a Backstage-style catalog, GitHub repos, Kubernetes, PagerDuty, and an IdP that owns groups. Ownership metadata must answer one question: which team is accountable for this service in production? Model the owner as a reference to a Group entity, not a free-text string. A generated service template writes a catalog-info.yaml at repo root and a CODEOWNERS file. The catalog is the authoritative registry; the repo file is the declaration that travels with code and gets PR review. CI registers the file to the catalog. The catalog resolves spec.owner against IdP groups; if the group does not exist, the entity is marked orphaned and production promotion is blocked.

YAML
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  name: payments-api
  annotations:
    cost-center: "cc-4412"
    data-classification: "pci"
    oncall: "pagerduty:payments-primary"
spec:
  type: service
  lifecycle: production
  owner: group:default/payments
  system: payments

CODEOWNERS:

* @my-org/payments

Mechanism and field sources

The catalog processor resolves spec.owner to a Group entity. spec.system must resolve to a System entity. Annotations are validated against the systems that own them.

fieldsource of truthvalidation
spec.ownerIdP groupcatalog resolves to Group; reject if missing
spec.systemcatalog Systemmust exist
spec.lifecyclerepo catalog-info.yamlenum: experimental, production, deprecated
cost-centerfinance systemannotation checked against finance API
oncallPagerDuty scheduleannotation checked against PagerDuty API
data-classificationsecurity registryannotation checked against security registry

CODEOWNERS only routes PR reviews. It is path-based and cannot represent a service with no code path, so it is never the ownership source of truth.

Trade-offs

Code-adjacent metadata wins when the field changes on code release cadence and the service team owns it: lifecycle, system, repo, runtime dependencies. Central registry wins when the field changes on org cadence and another authority owns it: team existence, cost center, on-call rotation, data class. Deciding criterion: who can change the value without a code review? If finance or security, keep it central and reference it by ID. Do not put on-call rotation in git; rotations change weekly and git history is the wrong audit trail. Do not infer owner from the last committer; that is a person, not an accountable team.

Failure modes

  • Orphaned owner: IdP group deleted, service still references it. Detection: daily reconciliation job queries IdP; alert if spec.owner unresolved for more than 24 hours. Cost: pager falls to default queue, incident MTTA rises.
  • Drift: someone edits the catalog directly, repo file disagrees. Detection: reconciliation diffs git-declared fields against catalog; alert on mismatch. Cost: authorization and routing use stale owner.
  • Stale last-committer inference: service owner inferred from last commit author. Detection: compare inferred owner to declared owner; if mismatch exceeds 10% of services, flag. Cost: wrong team paged.
  • Sensitive field exposure: cost center or data class in public README. Detection: audit log review and repository scanning for annotation keys in public repos. Cost: compliance finding.

Reconciliation trace

  1. Read catalog-info.yaml from default branch.
  2. Resolve spec.owner against IdP group list.
  3. If missing, mark entity orphaned, open ticket to platform team.
  4. Compare annotations to finance, PagerDuty, security APIs.
  5. If drift, open PR to repo for service-owned fields; update catalog for centrally owned fields.
  6. Emit audit event for every mutation.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-13

Design observable scaffolding workflows.

Answer

What I'd say first

"Scaffolding workflow" is ambiguous, so I'd pin it down before designing: a self-service path where a developer picks a template and the platform creates a repo, provisions a namespace and a database, wires CI, and registers the service in the catalog. Assume ~50 runs/day, 5–6 steps, several with external side effects (GitHub, cloud IAM, Postgres), and a platform team of three on call.

The decision that makes it observable: model the scaffold as a durable, resumable run with an append-only event log, and make the run, not the HTTP request, the unit you observe. The request can die; the run can't. Every run gets an immutable run_id, the template version, the actor, the reviewed inputs, and the desired end state. Steps emit events; the run's current state is a fold over those events, never a mutable row you overwrite.

What each state exposes

StateUser seesOperator seesTerminal
queuedposition, ETAqueue depth, oldest ageno
runningcurrent step, % donestep durations vs p99, retriesno
failedfailed step, retryable?, support linkerror class, dependency, run historyyes
succeededrepo/namespace/DB linksside effects created, costyes
cancelledwhat was rolled backcompensations run, orphansyes

A trace of a run that fails and resumes

Run r-7f3a, steps: create-repo → provision-namespace → create-db → wire-ci → register-catalog.

  • t0 create-repo → succeeded (GitHub repo created)
  • t1 provision-namespace → succeeded
  • t2 create-db → failed (quota exceeded), retried 3×, permanently failed after ~31s of backoff
  • workflow emits run.failed{failedStep: create-db, retryable: true}
  • operator raises the quota, calls resume(r-7f3a)
  • the engine replays history, skips the two succeeded steps, re-runs create-db
  • t3 wire-ci → succeeded, t4 register-catalog → succeeded, run.succeeded

That replay is the whole point: succeeded steps are not re-executed, which is why the event log, not a status column, has to be the source of truth.

Trade-offs

A durable engine (Temporal, or Step Functions) gives you replay, retries and compensation for free. Temporal's default RetryPolicy is initialInterval 1s, backoffCoefficient 2.0, maximumInterval 100s, maximumAttempts 0 (unlimited): set maximumAttempts explicitly on any non-idempotent step, or a retry storm creates duplicate databases. A hand-rolled DB state machine is cheaper to run and easier to debug, but you own replay, timeouts and compensation yourself; pick it only when steps are few and all idempotent. A synchronous handler is simplest for the user but cannot survive a browser disconnect and gives you nothing to resume: avoid it once any step touches an external system.

Failure modes and how you catch them

  • Duplicate submit (double-click, retry after disconnect): two repos. Detect with an idempotency key on the run; alert when more than one run shares a key.
  • Partial completion: repo exists, namespace doesn't. Detect by alerting on runs running longer than 10× the p99 step duration; a reconcile job re-drives them.
  • Non-idempotent step re-run: a second database after a retry. Detect by counting resources per run and alerting on >1.
  • Secret leakage: template inputs can carry tokens. Detect with a log scrubber plus a canary token you plant in test inputs and grep for.
  • Silent dependency failure: IAM API degraded. Detect by tracking per-dependency error rate, not just overall failure rate.

The deciding rule: if any step has an external side effect you can't undo, you need a durable run with an event log and explicit compensation. If every step is idempotent and fast, a DB state machine is enough.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-5

Test a golden-path template before release.

Answer

Clarify, then answer. A golden-path template is the scaffold a platform team publishes so a new service is born already wired for CI, IaC, observability, secrets and catalog metadata: a Backstage scaffolder, a cookiecutter, or a Terraform module plus repo skeleton. It is a product with three surfaces: the generator (does it handle inputs), the generated repo (does it build and deploy), and the running service (does the paved road work end to end). I'd assume it is versioned and consumed by many teams, which is what makes the blast radius large.

So: on every PR, render the template across a curated option matrix and run static, build and secret checks on the output. On merge to main, run one full generate → deploy to an ephemeral environment → smoke → tear down. Nightly, regenerate a canary service and diff it against the last known-good to catch drift against the platform.

The layers, and what each is worth.

LayerWhenCostCatches
render + lintevery PR~30 stemplate syntax, missing vars, invalid option combos
build + unitevery PR2–5 mingenerated code that doesn't compile, broken imports
policy + secret scanevery PR~1 minplaceholder tokens, non-compliant IaC
ephemeral deploy + smokemerge to main10–20 min, real spendIAM, DNS, secret wiring, observability
nightly canary + diffnightly~15 mindrift vs platform APIs

Don't test the full matrix. Four binary options is 16 combinations; at 15 minutes each that is four hours per run. Pairwise coverage, every pair of option values exercised at least once, takes 6 runs, about 90 minutes, and catches the interaction bugs that actually occur. Test the two or three profiles you actually ship exhaustively; sample the rest.

How the template fails, and how you'd know.

FailureDetectionBlast radius
non-idempotent generatorrun generate twice, diff the treeevery re-run duplicates CI blocks
stale base image or runner labelnightly canary diffevery new service fails to build
placeholder secret committedgitleaks over rendered outputcredential leak in every new repo
wrong owner in catalog-infocatalog validation in CIservice invisible, on-call routing fails

The first one is the one people miss. A generator that appends rather than replaces looks fine on a fresh repo and corrupts an existing one, so the test is generate-into-a-dirty-tree, not generate-into-empty.

Trade-off: how heavy to go. The deciding criterion is who consumes the template. A template used by one team behind a flag gets render + build + unit on PR and nothing more: an ephemeral deploy per merge is 20 minutes and real cloud spend for a blast radius of one. A template that is the org's paved road gets the full ephemeral run on merge, because a bug there is multiplied by every service created after it. If ephemeral environments are too expensive, the cheaper substitute is a shared long-lived staging namespace plus a nightly full run, accepting that a broken template can land during the day.

What would change my mind. If the template has two or fewer options, drop pairwise and test the shipped profiles directly. If the nightly diff is noisy because the platform changes daily, pin the canary to a released template version and diff only on template changes.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-6

Evolve a template used by hundreds of services.

Answer

Let me clarify the setup. Assume the template is a repository scaffold (say, a service skeleton with a Dockerfile, CI config, and logging setup) used by 300 services across 20 teams. Some files are generated (CI pipeline), some vendored (a shared library), some team-owned (business logic). The change is a new logging format. The goal: roll it out without breaking services or losing local edits.

The core answer: treat the template as a versioned dependency. Ship the change as an opt-in feature first, canary it to a few services, then automate migration with patches that respect local edits. Only retire the old version after telemetry shows zero consumers.

Why does canary work? A template change can fail in ways unit tests miss: e.g., a new CI step that times out only on repos with large test suites. Canary on 5 services with diverse characteristics (different languages, test sizes) gives a 24-hour window to catch that. Why region marking? If you mark generated regions with comments like # generated: do not edit, a patch tool can replace only those regions, leaving team-owned code untouched. This is a common pattern in scaffolding tools. Why versioned components? If you extract the template into a versioned package (e.g., a shared CI library), services can upgrade independently, and you can support multiple versions in parallel.

Tradeoffs: Regeneration is simpler. Delete and re-render the repo. But it destroys local changes and forces teams to re-apply customizations. Patching preserves local changes but requires a merge tool and can fail on conflicts. Use regeneration when services have few local changes (e.g., <5% of files) and you can automate re-application. Use patching when local changes are common. A middle ground: versioned components that are imported, not copied.

Failure modes with detection:

  1. Silent overwrite: a patch script overwrites a team's custom logging config. Detection: after running the patch, git diff shows unexpected deletions. Cost: broken builds, lost work. Mitigation: dry-run mode, require PR review.
  2. Canary not representative: you canary on 5 services that all use Python, but the change breaks Go services. Detection: monitor build success rate and error logs per language. Cost: delayed detection, wider breakage. Mitigation: stratify canary by language, test size, and team.
  3. Version skew: 50 services remain on v1 after v2 is released, missing a security fix. Detection: inventory scan (e.g., grep for template version in a metadata file) and telemetry. Cost: security exposure. Mitigation: set a support window (e.g., 90 days) and automate reminders.
  4. Ownership gap: no one reviews migration PRs. Detection: PR age > 7 days, CODEOWNERS coverage < 100%. Cost: stalled migration. Mitigation: map services to owners via Backstage catalog, escalate to managers.

Here's a table comparing strategies: | Strategy | Local changes preserved? | Effort per service | Risk of breakage | When to use | | Regenerate | No | Low (automated) | High | Few local changes, simple template | | Patch | Yes | Medium (merge conflicts) | Medium | Many local changes, complex template | | Versioned component | Yes | Low (dependency bump) | Low | Template can be extracted as a library |

And a code snippet showing region marking:

YAML
# generated: begin
logging:
  format: json
  level: info
# generated: end
# team-owned: begin
# Add custom appenders here
# team-owned: end

A patch script can use git apply --3way patch.diff to merge changes.

Finally, a canary rollout trace for 300 services (hypothetical): Day 0: Release template v2.0.0 with opt-in flag. Day 1: Enable flag on 5 canary services (1 Python, 1 Go, 1 Java, 1 large test suite, 1 small). Monitor for 24h: build success rate, p99 CI time, error logs. Day 2: If no regression, enable on 30 services (10%). Day 3: 150 services (50%). Day 4: all 300. For services with local changes, open a PR with the patch; require owner approval. Track adoption via a dashboard: 100% by day 30. Retire v1 after 90 days of zero usage.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-24

Design an upgrade channel for golden-path components.

Answer

Assume golden-path components are shared artifacts: libraries, CI workflows, Terraform modules, base images, policies. The channel must let component owners ship fixes without forcing every consumer to upgrade at once, and let service owners see what they run. I'd build three lanes and one inventory.

Lane 1: central dependency. Publish immutable versions to a registry. Use SemVer: 1.4.2. Consumers pin exact or caret. Renovate or Dependabot opens PRs. For internal npm packages, Renovate config:

JSON
{
  "extends": ["config:recommended"],
  "rangeStrategy": "bump",
  "packageRules": [
    { "matchUpdateTypes": ["patch"], "automerge": true },
    { "matchUpdateTypes": ["major"], "automerge": false }
  ]
}

Patch automerge only after CI. Major requires human review. For GitHub Actions, pin to full commit SHA for third-party, tag v2 for internal reusable workflows. For Terraform modules, ref=v3.1.0. For base images, FROM ghcr.io/acme/base:1.2@sha256:... so tag is readable and digest is immutable.

Lane 2: copied files. Scaffolds, Makefiles, policy files. Record origin in a header: # source: acme/golden-path/templates/service.yaml@v5. A bot regenerates a PR when template changes. Merge boundary is the service owner; they can reject. This avoids central runtime coupling but drifts. Detection: a weekly job compares file hash to template hash; drift > 30 days alerts owner.

Lane 3: release channels and support windows. Stable, beta, canary. Compatibility matrix: component version vs consumer runtime. Changelog with breaking changes. Support window: e.g., last two minor versions get security patches; older get best-effort. Security urgency policy: CVE with CVSS >= 7.0 triggers forced upgrade within 7 days; lower within 30.

Trade-offs. Central dependency gives one fix, but blast radius. Copied files give autonomy, but drift. Decide by coupling: if component runs in-process or holds a security boundary, central. If it's a scaffold, copy. Central is wrong when breaking changes are frequent and consumers can't coordinate; then use a compatibility shim or fork. Copied is wrong when the file encodes a security policy; then centralize.

Failure modes. 1) Silent drift: service pins old base image, CVE unpatched. Detection: inventory query joins deployment image digests to supported versions; alert when deployed < minimum. Cost: 20 lagging services = 20 owner contacts. 2) Canary passes, prod fails on persisted state: migration not backward compatible. Detection: run upgrade against restored prod snapshot; check migration lock wait > 5s. 3) Rollback fails because forward migration ran. Use expand/contract: add column, deploy code, backfill, remove old column next release. Detection: rollback test in staging.

Worked trace (hypothetical). 40 services use base image 1.2. Canary 5% = 2 services for 30 min. Gate: error rate > 0.5% or p99 > 200 ms. If pass, 25% = 10 services for 1 h, then 100%. If fail, pin previous digest. For a library, Renovate PR runs unit tests, then canary deploy to one service. If that service has a DB, require expand/contract. Track deployed versions by scraping package.json and image digests from Kubernetes; dashboard shows lag. Contact owners whose services lag > 30 days.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-14

Handle a defective template released broadly.

Answer

Clarify, then answer. Two things decide this: is the template a scaffolder that generates repos and CI, or an IaC module the template pins, and has anything been applied to production yet? Those answers pick between freeze-and-revert and freeze-and-migrate.

Assumptions I'll state: an internal platform template (Backstage scaffolder + a pinned Terraform module + a reusable GitHub Actions workflow) that generated ~240 repos over three weeks; the defect is in the generated output, not the scaffolder; some repos have already applied infra.

Direct answer: freeze first, then split the fleet by state, not by team. Freeze new executions and automated upgrades, enumerate the exact generated set from provenance, revert only the cohort whose state is still plan-compatible with the previous template output, and migrate the rest with a versioned repair. Never force-push a repair over generated repos without diffing for user edits.

Why revert fails. A template is a generator, not a running system. Reverting the template version changes what the next generation produces; it does nothing to repos already generated or infra already applied. Revert is safe only while the generated state is still plan-compatible with the old output: same resource addresses, same provider version, no schema migration. The moment the defect caused a rename, a provider bump, or a state mv, terraform plan against the old module returns a non-empty diff, and applying it destroys or recreates resources.

How provenance enumeration works. Three independent sources, cross-joined on repo name:

  • VCS: repos created from the template. GitHub's template-repository API (is_template on the repo object, or gh api search) or a code search for the marker file the template writes.
  • IaC state: terraform state list per workspace, plus the module source ref recorded in state (module.x.source = "...?ref=v1.4.2").
  • Catalog: Backstage entities carrying the origin annotation your scaffolder stamps, if you don't have one, adding it is the first fix.

Anything in state but not in the catalog is an orphan; anything in the catalog but not in state was generated but never applied.

Cohort decision.

cohortsignalaction
state matches old output, no user editsterraform plan empty after pinning old refrevert ref, re-run pipeline
state drifted (rename, provider bump)plan non-empty, shows replaceversioned repair + state mv
generated, never appliedno state entrydelete repo or regenerate
user edits presentdiff vs template output non-emptypatch forward, never force-push

Worked trace (hypothetical figures). 240 repos generated; 152 still on the bad ref, 88 already bumped. Of the 152, 61 plan clean against the old ref → revert. 91 show a replace → migrate. 12 of the 240 have user edits in generated files → patch forward.

Failure modes and detection.

  • Drifted resources: revert applied anyway, plan shows a database replace. Gate every revert on terraform plan -detailed-exitcode returning 0.
  • Orphaned repos: repo deleted, cloud resources remain. Detect with state list minus catalog entities, run weekly.
  • Partial canary: the three pilot services never exercised the conditional branch carrying the defect. Assert canary coverage of each template branch before promoting.
  • Overwriting user changes: force-push clobbers local edits. Diff generated files against fresh template output; non-empty means stop.

Root cause closes the loop: contract tests on template output, pinned refs, staged release channels, and a rollback drill that runs the revert path on a throwaway repo before the next release.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-4

Secure a software-template supply chain.

Answer

I’d scope “software-template supply chain” to the artifacts a team copies or executes to start a service: repo templates, CI/CD workflow templates, IaC modules, container base images, and package manifests. Assume GitHub Actions, Docker, Terraform, npm/PyPI. The core answer: treat templates as untrusted code. Pin every executable identity to an immutable digest or commit SHA, verify provenance before use, run with least privilege in an isolated runner, and gate promotion on scan/SBOM/policy. Then automate updates so pinning doesn’t rot.

Why: a template is a transitive dependency with your credentials. A mutable tag or unpinned module lets an upstream compromise become your compromise. The controls map to attacks:

AttackControlDetection
Compromised action tag moved to malicious commit (e.g., tj-actions/changed-files, March 2025)Pin actions to full commit SHA; allowlist actions; review diffsGitHub audit log, secret scanning, unexpected workflow runs
Dependency confusionScope internal packages, private registry, verify checksumsSBOM diff, package source in lockfile
pull_request_target + checkout PR codeUse pull_request with read-only token; require approvalOIDC token claims, workflow logs
Mutable base image latestPin image@sha256:...; rebuild on digest changeTrivy/Grype scan diff, image digest alert
Terraform module ?ref=mainPin to commit SHA; policy checkterraform plan diff, OPA/Conftest

A hardened GitHub Actions job looks like this. For repos created after Feb 2023, GitHub’s default GITHUB_TOKEN is read-only; older repos may still be read/write, so set permissions: explicitly.

YAML
# GitHub Actions, current syntax 2025
name: build
on: [push]
permissions:
  contents: read
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@<40-char-sha> # v4.2.2
      - uses: actions/setup-node@<40-char-sha> # v4.0.4
        with:
          node-version: '20'
      - run: npm ci --ignore-scripts

Trade-offs. Pin by SHA vs tag: SHA stops tag mutation; update toil. Renovate or Dependabot can open PRs for SHA updates. Deciding criterion: if the template can touch production credentials, pin to SHA and require review; a local scaffold with no secrets can use a tag plus scan. Internal mirror vs upstream: a mirror reduces upstream outage/compromise but becomes critical path; it needs the same signing and scanning. SLSA Build Level 3 vs 1: L3 gives non-falsifiable provenance but requires a hosted build with isolated steps; L1 is easy but only says provenance exists. Choose by blast radius and compliance. Allowlist vs blocklist: allowlist is stricter but blocks new tools; blocklist is cheaper but misses unknown actions.

Failure modes, concretely. A compromised action leaks GITHUB_TOKEN or a cloud OIDC token. Detection: secret scanning, audit log workflow_run with unexpected actor, egress to unknown IP. Cost: rotate all secrets, audit repos, rebuild. Dependency confusion installs a public package over an internal one. Detection: lockfile source diff, SBOM. Cost: incident response, possible code execution. pull_request_target runs untrusted code with secrets. Detection: workflow run from a fork with write token. Cost: secret rotation, repo audit. A base image digest changes silently. Detection: Trivy/Grype scan diff, digest alert. Cost: rebuild, redeploy. A template generates state with hardcoded secrets. Detection: secret scanning in generated repos. Cost: rotate, rewrite template, notify users.

Use Sigstore/cosign signatures and SLSA provenance for releases; Syft for CycloneDX or SPDX SBOMs; Grype or Trivy for scans; OpenSSF Scorecard for repo hygiene; OPA/Conftest for policy gates; Vault or cloud OIDC for short-lived credentials (AWS STS AssumeRole defaults to 1 hour; shorten to 15 minutes for CI). Isolate runners with gVisor or Firecracker when templates execute untrusted code. Never echo secrets. Dry-run with terraform plan or kubectl --dry-run, contract-test generated APIs, canary a small percentage, log OPA decisions, and run a game day: rotate secrets, roll back the template version, repair generated state with terraform state rm and re-import. The deciding question is blast radius: if the template can touch production credentials, pin to SHA, require SLSA L3, and isolate; if it is a local scaffold, tag plus scan is proportionate.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-20

Design secrets handling for a service path.

Answer

Assumptions I'd state before designing: a Kubernetes service (EKS 1.29, namespace orders) that needs a Postgres 16 credential on RDS plus a third-party API key; CI is GitHub Actions; secrets live in AWS Secrets Manager in eu-west-1. If your path is a VM or a Lambda the shape holds, but the identity primitive changes.

The answer. Don't distribute secrets: distribute the right to fetch them, and make that right expire. Three moves.

  1. Give the workload an identity AWS trusts directly. On EKS that's IRSA: annotate the service account and the pod receives a projected OIDC token the AWS SDK exchanges for STS credentials.
YAML
apiVersion: v1
kind: ServiceAccount
metadata:
  name: orders-api
  namespace: orders
  annotations:
    eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/orders-api-secrets

The trust policy pins the subject so no other namespace can assume the role:

JSON
"Condition": {"StringEquals": {
  "oidc.eks.eu-west-1.amazonaws.com/id/EXAMPLE:sub":
  "system:serviceaccount:orders:orders-api"}}
  1. Scope the read to a name prefix, not secretsmanager:*:
JSON
{"Effect":"Allow","Action":"secretsmanager:GetSecretValue",
 "Resource":"arn:aws:secretsmanager:eu-west-1:111122223333:secret:orders/db-*"}
  1. Fetch at startup into process memory: never into the pod spec, an env var, a ConfigMap, a log line or CI output. Env vars leak through /proc/<pid>/environ, crash dumps and child processes; a 0400 file in an emptyDir at least dies with the pod.

Where the real decision is. Credential lifetime against revocation latency:

OptionCredential TTLRevocation latencyBlast radius
Static k8s Secret as env varuntil someone rotates itredeploy every consumeranyone with get secret in the namespace, plus etcd and dumps
IRSA → Secrets ManagerSTS creds 1 h (default)delete trust policy → ≤ 1 hone service account
RDS IAM auth15 min tokenrevoke IAM permission → ≤ 15 minone connection

For the database I'd take the third: RDS IAM auth issues a 15-minute token, so there is no password to rotate at all. Secrets Manager stays for the third-party API key, which has no IAM equivalent.

Caching is the revocation window. Cache the fetched value for 5 minutes and a revoked secret keeps working for 5 minutes. Pick that TTL from the incident you're willing to have, not from load.

Failure modes and how I'd catch them:

  • Secret in CI logs. GitHub masks registered secrets but not derived forms (base64, URL-encoded). Detect with a log scanner over job output plus a CloudTrail alarm on GetSecretValue from an unexpected principal ARN.
  • Forked PRs. pull_request from a fork gets no secrets; pull_request_target does, and runs base-repo secrets against PR-head code. Audit for that combination: it's the standard exfiltration path.
  • Rotation breaks the app. Secrets Manager's RDS rotation uses two alternating users so both passwords are valid during the window; without it, a 30-day rotation is a 30-day-latency outage waiting to happen.
  • Secrets Manager outage. Pods that fetch at startup fail to start. Bound the stale-while-error fallback to the same 5-minute TTL so an outage doesn't silently become a permanent bypass.
  • Break-glass. One sealed credential in a separate account, reachable only through an approval step that pages, with every use alarming.

Local dev gets a dev-account secret fetched with aws sso login credentials, or a throwaway Postgres in Docker. Production values never reach a laptop.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-11

Design security guardrails within a paved road.

Answer

The first 90 seconds

State the assumption that decides the design: services run on Kubernetes, a platform team owns the repo template and the pipeline, and developers still hold kubeconfigs that can kubectl apply into their own namespaces. If deploys only ever go through the pipeline, all of this can live in CI and the job gets much smaller.

The paved road is the template, the pipeline and the deploy path. Guardrails are the parts that push back: a scaffold that makes the safe configuration the free one, CI checks that comment on a pull request, and admission control that catches whatever reaches the API server by another route. Build the scaffold first: a good default beats a rule nobody can satisfy. Three properties decide whether a guardrail helps or gets routed around: where it runs, whether it fails open or closed, and whether a developer can fix it from the message alone.

Where each control sits

StageGuardrailModeHow it fails
ScaffoldNon-root user, read-only root filesystem, all capabilities dropped, digest-pinned base image, ServiceAccount bound to a cloud workload identity instead of a static keyon by defaultnothing: cheapest place to fix anything
Pull requestSecret scan (gitleaks), lockfile CVE scan (osv-scanner), IaC scan on the Helm or Terraform diffwarn as a PR commentnoisy rules get muted, then nobody reads them
BuildSign the image keyless with cosign under the CI's OIDC identity; attach an SBOM and build provenanceenforce for release artifactsunsigned legacy images need a named break-glass
DeployAdmission policy: digest-only image refs, non-root, no hostPath, no added capabilitiesAudit two weeks, then Enforcea fail-closed webhook outage blocks every create in the cluster
RuntimeBackground scan of effective state against the template; alert on writes to prod namespaces from a non-pipeline identitydetect and alertdrift survives indefinitely if you only scan manifests in git

Where enforcement actually happens

A CI check inspects a commit; admission inspects the object that lands. Those are different controls, and only the second one holds when someone applies a manifest from a laptop. The price is that admission sits on the cluster's write path: a ValidatingWebhookConfiguration defaults to a 10 second timeout, so a policy taking 300 ms per pod adds 300 ms to every pod create, and failurePolicy: Fail means that while the webhook is down, nothing the webhook matches gets created anywhere. What actually keeps that safe: two or more webhook replicas spread across zones, a namespaceSelector that excludes kube-system and the platform namespaces so the policy engine cannot lock out its own startup, webhook availability treated as a paged dependency, and policy evaluation kept in single-digit milliseconds by never making a network call from inside the policy.

What the scaffold hands the developer

YAML
spec:
  template:
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 10001
        seccompProfile: { type: RuntimeDefault }
      containers:
        - name: api
          image: registry.internal/api@sha256:<digest>   # digest, never :latest
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities: { drop: ["ALL"] }

These are the same fields the admission policy enforces, so a service created from the template never trips it. That is the whole point: the compliant path is the shortest one.

Exceptions

Every rejection carries rule, rationale and the exact YAML to paste. No YAML in the message means the developer asks in chat and waits a day. Exceptions are a namespace label plus an owning group and a 90 day TTL, one renewal maximum. The arithmetic that keeps you honest: 30 requests a month with a 90 day life is 90 open exceptions at steady state, and if 40% get renewed the count only grows. Track median age, not count.

Failure modes

  • Bypass: direct kubectl apply with a personal kubeconfig. Detect with an audit-log alert on writes to prod namespaces from a non-pipeline identity; that fires long before any policy does.
  • Drift: a hotfix edited in the cluster. Detect with a background scan of effective state, revert through the reconciler.
  • Fatigue: a blocking rule with a false-positive rate above roughly 5% gets worked around. Ship as warn, measure for two weeks, then flip to enforce.

When not to

Under about five services and one team, a reviewed template plus a CI check is the whole answer; an admission webhook is one more dependency you have to run at 3 a.m. Multi-tenant clusters with contributors you do not know are where fail-closed enforcement earns its keep.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-19

Design cost controls for a paved road.

Answer

Assumptions. Internal Kubernetes platform on one cloud, ~200 services, a platform team of six, teams self-serve through Terraform modules and a Helm chart. If your road is VM-based or multi-cloud the enforcement points move, but the three-layer shape below does not.

The 90-second answer

Cost controls on a paved road work at three points, in order of leverage: the default, the admission gate, and the after-the-fact signal. The default is strongest because most teams never change it: whatever CPU request, storage class and replica count your module ships is what you will pay for across the fleet. The gate catches the minority who deviate. The signal catches drift the first two missed.

Attribution is the prerequisite for all three. Cloud billing emits line items keyed by resource ID; the mapping from resource to team exists only if the label was on the resource at creation and your billing export joins to a resource inventory. Concretely: join the AWS Cost and Usage Report's line_item_resource_id against an inventory table built from the Kubernetes API and cloud describe calls, refreshed daily. Anything that fails to join lands in unallocated. Track that fraction as your first metric: above ~5% of the bill, every downstream number is fiction.

Defaults, with the arithmetic

Ship a module where the boring choice is the cheap one: Karpenter node pools with spot for stateless workloads, gp3 as the default storage class (io2 requires an annotation), log retention 30 days, two replicas, and a LimitRange that sets a default request of 250m CPU / 512Mi.

Why the request matters more than the limit: the scheduler bins pods by request, so an inflated request reserves capacity nobody uses. A service at 5 replicas × 2 vCPU requested, actually burning 0.2 vCPU each, holds 10 vCPU to do 1 vCPU of work. At a hypothetical $0.04 per vCPU-hour that is 9 wasted vCPU × $0.04 × 730 h ≈ $263/month for one service. Multiply by the fleet and the default is the whole budget.

Gate and signal

Enforce with Kyverno or OPA Gatekeeper: deny LoadBalancer services and io2 volumes without an annotation, require cost-center and team labels, and cap each namespace with a ResourceQuota. Pair that with AWS Budgets at 80% forecast and 100% actual. Exceptions are an annotation carrying an expiry date, reviewed weekly: an exception with no expiry is a new default.

For anomalies, don't alert on raw spend. Compute daily cost per service, compare against a rolling 14-day median, and fire when today exceeds median + 3×MAD and clears a $50 absolute floor. The MAD term keeps one spiky day from resetting the baseline; the floor keeps you from paging on a service that costs $3.

Trade-offs

Hard quota versus soft budget is the real decision. A hard quota stops runaway spend but turns a legitimate traffic spike into an outage; a soft budget never stops anything. Decide by SLO: production services with an availability target get soft budget plus anomaly alert plus on-call; non-production and batch get hard quotas, because their failure mode is a delayed job, not a customer-facing error.

Showback versus chargeback is the second. Run showback (visibility, no internal invoices) until attribution is above 95% accurate. Chargeback on bad data makes teams optimize the allocation argument instead of the spend.

Failure modes and how you see them

FailureDetection
Unallocated cost growsUnallocated fraction of monthly bill > 5%
Resources created off-roadWeekly diff of inventory vs. billing line items
Quota friction blocks deploysCount admission denials/week and median time-to-exception
Idle reservationsp95 CPU usage < 20% of request for 14 days
Forecast is decorationMonth-end MAPE of predicted vs. actual > 20%
Alert fatigueRatio of anomaly alerts that led to a change, tracked monthly

The last row is the one teams skip. An anomaly detector nobody acts on is a dashboard, not a control.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-21

Design a path for regulated workloads.

Answer

What I'd say first (60–120s)

Three things decide this design, so I'd pin them before drawing anything: the regime, the data, and who signs off. Take a payments service on AWS handling cardholder data: PCI DSS 4.0 applies, the cardholder data environment (CDE) is the audit boundary, and the acquirer's QSA reads the evidence. I'd assume multi-account AWS Organizations, Terraform for infrastructure, and the product team owning the workload.

The path has three layers. A landing zone that provisions each account already inside the controls, so compliance is a property of the account rather than of a review. A pipeline that is the only writer to the account, with policy checks that fail the plan. Continuous evidence, where the logs and configuration state that prove the controls are produced by the platform instead of assembled by hand before an audit.

The technical difference from a normal deploy path is where enforcement lives. A normal path enforces at review time: a human reads the Terraform. A regulated path enforces at the account boundary with preventive controls and evaluates continuously with detective ones. Review can be skipped under deadline; the boundary can't.

Mechanism

Preventive controls are SCPs on AWS, Azure Policy with the deny effect, or GCP Assured Workloads folders. The control plane evaluates them on every API call, before the resource exists, so a denied call returns AccessDenied and creates nothing. Detective controls (AWS Config rules, Security Hub, GuardDuty) evaluate state after the fact and produce findings.

ControlPreventiveDetective
Data residencySCP denying any action whose aws:RequestedRegion isn't in the approved listConfig approved-regions rule; non-compliant → EventBridge → ticket
Public exposureSCP denying s3:PutBucketPublicAccessBlock unless all four block flags are trueConfig s3-bucket-public-read-prohibited
Encryption at restSCP denying ec2:RunInstances unless ec2:Encrypted is trueConfig encrypted-volumes
Audit loggingSCP denying cloudtrail:StopLogging and cloudtrail:DeleteTrailCloudTrail log-file validation plus Config cloudtrail-enabled

Trace

An engineer runs terraform apply to add a cache in us-east-1. Terraform calls elasticache:CreateCacheCluster in that region. The OU's SCP denies any action whose aws:RequestedRegion isn't approved, so the call returns AccessDenied and the apply fails on that resource. Nothing was created, nothing needs cleanup, no finding is filed: the failure is the control working, and it surfaces in CI rather than in production.

Trade-offs

Preventive versus detective is the real decision. A deny is cheap to operate and expensive to live with: every deny is a ticket to the platform team, and a slow exception path is what makes engineers route around the platform. The criterion I'd use: deny when the mistake is irreversible or externally visible. Region, public exposure, logging switched off. Detect when it's fixable in place: tags, patch level, unused keys.

Scope reduction versus a shared platform is the second. Putting the CDE in its own OU and accounts shrinks the PCI audit boundary to those accounts; the cost is duplicated tooling and a second pipeline. For most organisations that's cheaper than raising the whole estate to PCI level, because the QSA assesses the CDE, not the company.

Failure modes

Drift: someone edits a security group in the console. The Config rule goes non-compliant, EventBridge fires, a ticket opens. The nastier version is that the next terraform apply reverts the manual rule and breaks the app that came to depend on it, which is why human roles should be denied mutating actions by SCP, leaving the pipeline as the only writer.

Exception rot: a break-glass role granted during an incident and never revoked. Detect it by querying the exception register for entries past expiry and alerting on break-glass assumption outside an incident window.

Evidence gap: CloudTrail management events are on, data events are off, so object-level reads in the CDE aren't logged. PCI DSS 10 requires that access logging, and the gap surfaces at audit, not at deploy. Detect it with a control-to-log-source coverage check that fails the pipeline when a control has no producing log.

Regime drift: PCI DSS 4.0's future-dated requirements, including the client-side script controls in 6.4.3 and 11.6, became effective 31 March 2025. A path built before that date needs the control set re-mapped, not just re-run.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-7

Migrate a brownfield service onto a paved road.

Answer

First I'd pin down what "paved road" means here, because the plan depends on it. I'll assume it's the platform team's supported path: a repo template, a standard build, a deploy pipeline (say Argo CD reconciling a Helm chart the platform owns), workload identity instead of static keys, secrets from a managed store, and default dashboards and alerts. I'll also assume the service is live with real traffic and an on-call rotation, so it has to stay shippable at every step.

Given that, the answer is: don't rewrite the service onto the path. Move its deployment and operational surface onto the path incrementally, keeping the old path runnable until the new one has carried a full traffic cycle. Service code changes only where the path's contract forces it.

The reason that's the hard part: a paved road is a contract, not a tool. The platform's chart assumes a shape: one deployable per repo, a container listening on one port, a health endpoint, config from environment, no persistent local state. Brownfield services violate that shape in ways that don't surface until deploy time: a second process in the same container, a health check that returns 200 while the app is still warming, config read from a file baked into the image. So the migration is a delta-closing exercise. Inventory is step one only because you need the delta; the list itself isn't the work.

strategywhen it winswhat it costs
Big-bang rewrite onto the pathservice is small, few consumers, or already being rewrittena freeze; rollback means redeploying the old stack
Strangler / parallel-runservice is on the critical path with many consumerstwo deploy paths live; drift and split-brain risk
Adapter / compatibility shimdivergence is small and stablethe platform carries a special case indefinitely

Deciding criteria: blast radius (how many consumers break), distance from the contract, and whether the service is scheduled for decommission. If it's going away in a quarter, don't migrate it: document the divergence and let it die. Same if the path genuinely can't express its shape, e.g. it needs host networking or local persistent state.

Failure modes, with how you catch them:

  • Split-brain during parallel run. Both the old pipeline and Argo CD can reconcile the same Deployment, so they flap. Detect with drift alerts (Argo CD OutOfSync, or a diff job against live state), not with service metrics: the service looks healthy while it flaps.
  • Identity cutover. Swapping static keys for workload identity breaks callers that read the old secret. The 401s land in the downstream service's logs, not yours. Stage it: issue the new identity, run both, then revoke.
  • Silent config drift. A required env var missing from the path's config map means the app starts on defaults. Fail fast at startup on missing required config; a smoke test that only hits the health endpoint won't catch it.
  • Rollback that isn't. Delete the old pipeline at cutover and "rollback" means rebuilding infra under incident pressure. Keep it until the new path has served a full cycle.

A cutover trace, with numbers: 3 replicas, 40 rps, p99 120 ms. Shift 5% of traffic for 24h, then 25% for 24h, then 100%. Abort and shift back if p99 exceeds 200 ms or the error rate exceeds 0.5% for five minutes. Watch the downstream dependency's error rate too, since identity and config failures show up there first. Only after 100% has held for a full business cycle do you delete the old pipeline and feed the gaps you hit back into the path's roadmap.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-9

Decide whether a golden path should be mandatory.

Answer

Short answer: mandate the control plane, earn the developer plane. Make mandatory only the things where you own the blast radius and the authority is external to the team: production change authorization, workload identity, audit, data handling. Everything else (the service template, the CI pipeline, the framework, the deploy tooling) should be the default you make so good that opting out costs more than opting in. A golden path that is mandatory end to end stops being a product and becomes a compliance gate, and engineers route around compliance gates.

Why the split falls where it does. A golden path does two jobs: it reduces the number of ways to do a thing, and it reduces the cost of doing it right. Mandating the first job is cheap and enforceable: an admission controller either admits the pod or it doesn't. Mandating the second is expensive and unenforceable, because the path has to cover every legitimate workload and it never does. The moment a team hits a case the path can't express (a GPU job, a stateful migration, a vendor SDK pinned to a specific runtime) the only options are an exception or a bypass. If the exception takes two weeks, you get a bypass, and now there's a shadow pipeline you can't see, patch, or audit.

What to mandate, and the authority behind it:

ControlMandatory?Authority
Production change authorization (who deploys what, with an approval trail)YesAudit / regulator / incident liability
Workload identity (SPIFFE/SPIRE, OIDC federation, no long-lived cloud keys)YesSecurity: the blast radius is the whole account
Build provenance (SLSA-style signed attestations)YesSupply chain
Service template, CI pipeline, deploy tooling, observability defaultsNo: default-onPlatform team's own product judgment

The test for the left column: if this control fails, does the damage land outside the team that skipped it? If yes, mandate. If the damage lands on the team itself, make the path good and let them choose.

Worked example (hypothetical figures). A platform team supports 400 services; golden path adoption is 62%. They mandate the template for all new services. Six months later adoption reads 94%, but 30% of those services were created by copying an existing repo and never touching the template, and 18 services deploy through a hand-rolled GitHub Actions workflow with a long-lived AWS key because the template's OIDC setup didn't support their cross-account role. The mandate moved the number, not the behavior. The fix isn't a stricter mandate; it's (a) making the OIDC path express cross-account roles, and (b) measuring what matters, share of production deploys carrying a signed provenance attestation, not share of repos created from the template.

Failure modes and how you see them.

  • Mandate too much: shadow systems. Detect by comparing admission-controller admits against CI-reported deploys; the gap is your bypass population.
  • Mandate too little: drift and audit findings. Detect by sampling: how many services hold a long-lived cloud key, how many have no owner.
  • Exceptions with no expiry: permanent exceptions. Every exception gets an owner and a date, and fails closed when it lapses.

Revisit. Re-evaluate when the gap that justified the mandate closes, when the path supports the cohort that was bypassing it. Until then the mandate is buying a number, not a control. Forced executions and portal logins are not product success.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-8

Design a governed off-road process.

Answer

What a strong candidate says first

"Off-road" here means a workload that deliberately does not use the paved path: the standard deploy pipeline, managed runtime, or managed datastore. The question is how to allow that without losing the controls the paved path gives you for free: vulnerability scanning, on-call routing, and lifecycle ownership. My assumption is a mid-size platform org, roughly 200 services, one paved deploy pipeline, and a team that wants to ship a GPU inference service the pipeline can't build.

The answer is a time-boxed exception lifecycle, not a form. Four moving parts: intake, tiered approval, catalog registration, and expiry enforced in CI.

Intake. One record, owned by a named human, not a team alias. It states the paved path it diverges from, the specific control it cannot meet, and the compensating control. No compensating control, auto-reject. Example: "Cannot use the managed Postgres because we need a Postgres extension it doesn't ship; compensating control is a nightly logical backup to object storage with 7-day retention, verified by a restore test in CI."

Approval tiers by blast radius. Concrete criteria, not vibes:

TierCriteriaApproversSLA
1No prod traffic, no customer dataTech lead + platform on-call5 business days
2Prod traffic or customer dataStaff engineer + security10 business days
3Regulated data or >1% of prod trafficArchitecture review board20 business days

Catalog registration. The exception is a first-class entity in the service catalog (Backstage, or whatever you run) with lifecycle: off-road and expires: <date>. That single fact is the mechanism: because it's in the catalog, it inherits vulnerability scanning, incident paging, and ownership queries automatically. Off-road does not mean invisible.

Expiry enforced in CI. Default 90 days. Renewable once with evidence of convergence progress. At 180 days the workload must either converge or be promoted to a paved-path candidate. The check is a step in the deploy pipeline:

if catalog.get(service).lifecycle == "off-road":
    if today > catalog.get(service).expires:
        fail("exception expired; converge or renew")

Trace: service gpu-infer has expires: 2025-09-01. On 2025-09-02 the pipeline reads the catalog, compares dates, and fails the build. The team cannot deploy until they renew or converge. An admin merge can bypass it: that's the known hole, and the audit log is how you detect it.

Review cadence. Monthly, query the catalog for all off-road entities and cluster by root cause. If three or more share a root cause, that's the signal to extend the paved path. If one team holds 12 exceptions, that's a signal the standard is wrong for them, not that they're reckless.

When this process is the wrong tool. A one-off experiment with no prod traffic and no data doesn't need an exception record: a sandbox with no network egress is cheaper. And if the standard is genuinely wrong for a whole class of workloads, don't grant 20 exceptions; fix the standard. The deciding criterion is whether the divergence is a control gap (needs governance) or a preference (needs a paved-path change).

Failure modes.

  • Exception sprawl: 40 open exceptions, none reviewed. Detected by a catalog count; cost is the paved path rots because no one feels the pain.
  • Expiry drift: exception expires, an admin merge bypasses CI. Detected in the audit log; cost is an unpatched workload running for months.
  • Orphaned owner: owner is a team alias and the team dissolved. Detected by a catalog query for entities with no active owner; cost is no one answers the page at 3am.

Arithmetic on review load: 200 services, 5% off-road = 10 exceptions. At 15 minutes each, monthly review is 2.5 hours: affordable. At 50 exceptions it's 12.5 hours, and you should be fixing the paved path instead.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-25

Resolve disagreement between platform standards and a product team.

Answer

First 90 seconds. Ask one question before arguing: which incident does this standard prevent, and how would we detect it? That splits the standard into a risk control and a platform preference, and the two resolve in opposite directions.

A control prevents a named incident. mTLS stops credential replay on the wire. Resource limits stop one service evicting its neighbours. Audit logging gives you the PII access trail. The product team can't opt out of a control: it can only offer a compensating control that covers the same incident, with an owner.

A preference makes the platform team's life easier: a specific ingress controller, a CI tool, a naming convention. No incident, no detection. The product team wins by default, and the platform team's cost is a cost, not a risk.

Most escalations are a preference wearing a control's clothes. Naming which one it is in the room usually ends the argument.

Worked example (hypothetical figures). A real-time bidding service has an SLO of p99 < 10 ms. The platform standard says every service uses the shared Istio ingress with mTLS and rate limiting. Canary both ways, 10,000 requests, same node pool, same payload:

Configp50p99p99.9
direct4.1 ms6.0 ms11.4 ms
through sidecar + mTLS4.6 ms8.2 ms15.9 ms

mTLS costs 2.2 ms at p99 and leaves 1.8 ms of budget. The ingress is not the blocker, so "we need to bypass the mesh for latency" is a preference argument, and it loses.

The real conflict sits underneath: the bid protocol is a custom binary protocol over TCP, not HTTP. Istio carries it as opaque TCP with mTLS, but it can't apply HTTP-level rate limiting, retries, or header routing. The standard's rate-limiting control cannot be satisfied on the shared ingress. That is a control conflict, and it needs compensating controls, not a waiver.

Options.

OptionFits whenCostResidual riskExit
ComplyStandard is a control, need is a preferencenonenonen/a
Time-boxed exceptionNeed is urgent, control can be compensated~1 eng-day to write and reviewdrift if there's no expiryexpiry forces a re-decision
Extend the standardTwo or more teams need itplatform eng weeksnonen/a
Separate pathNeed is structurally different, team owns the controlsduplicate tooling and on-callfragmentation, unpatched CVEsmigration plan

Decision. One team uses the protocol. The product team has an SRE who can own certificate rotation and rate limiting. Platform estimates 4 weeks to add protocol support to the shared ingress; the product deadline is 2 weeks. Grant a 90-day exception with compensating controls: a separate ingress terminating mTLS at the edge, a NetworkPolicy allowing traffic only from the shared mesh CIDR, and a WAF doing rate limiting. The product team owns certificate rotation and daily log review. The exception is an entry in a register with an owner and an expiry date, reviewed quarterly. At 90 days the platform team either extends the standard or the product team migrates.

Failure modes and how you detect them.

  • The exception outlives its expiry. Detection: the register has a date; a quarterly query returns entries past it. No register means no exception: just a permanent fork.
  • The separate path drifts on patching. Detection: the service's image digest stops appearing in the platform scan feed, or a CVE sits unacknowledged past your patch SLA.
  • The product team ships a shadow deployment instead. Detection: egress to IPs outside the mesh CIDR, or a cloud spend line item nobody owns.
  • The extension slips and the deadline passes. Detection: the platform team's own milestone date passes with no merged PR.

Write down the decision, the owner, the expiry, and the evidence. Watch p99, error rate, and cost per month. Revisit at expiry or on breach.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-10

Measure a golden path's success.

Answer

Assume "golden path" means the supported, opinionated route for a common developer task: standing up a new service, or getting a change to production. The first thing I'd say in the room: a golden path fails in two distinct ways, and they need separate metrics. It can be adopted but not effective: teams are mandated onto it and it is slower than the DIY route. Or effective but not adopted: you built something good that nobody uses. So I measure adoption and effectiveness, and I measure both against the off-road alternative, because the path only wins if it beats what people would otherwise do.

Adoption is a funnel, not a number. Eligible cohort is repos created in the org this week; the denominator is the thing most dashboards get wrong, because teams that never started are invisible in template telemetry.

stagedefinitionillustrative week
eligiblerepos created in org40
awareviewed template docs22
attemptedran the template14
completedfirst prod deploy via path11
retainedsecond deploy via path within 30d9

11/40 is 27.5% end-to-end. If the target is 70% within two quarters, the leak is aware→attempted (22→14), not the template itself: that is where I'd dig, with exit interviews on the eight teams who looked and walked.

Effectiveness is where the figures live. Time-to-first-deploy for a new service: DIY baseline is roughly 2–3 days of tickets and a handoff to platform; the path should land p50 under an hour and p90 under a day, measured from repo creation to first production deploy via OpenTelemetry spans on the workflow. Then DORA: lead time for change p50/p90, change failure rate, MTTR. Pulled from the same pipeline events, not a separate survey. The value claim is arithmetic: 11 services/week × ~2.9 days saved ≈ 32 engineer-days/week, and I'd state it that way so it can be attacked.

On measurement approach, the trade-off is real. Adoption rate alone is cheap and gameable: mandate it and you hit 100% while escape rate climbs. DORA outcomes are causally distant and confounded by team skill. A DX Core 4 or SPACE survey captures friction and cognitive load but is self-reported and quarterly at best. Direct workflow instrumentation is the most precise and the most expensive, and only covers what you instrument. Deciding criterion: pick the cheapest signal that can falsify your hypothesis. Early on, instrument the funnel. At scale, watch DORA plus escape rate and stop building dashboards.

Failure modes I'd name concretely. Mandating the path: adoption hits 100%, teams fork the template, escape rate rises. Detect by diffing template forks against the registry. Denominator blindness: you report 90% of template users succeed and miss the 60% who never opened it. Path drift: the golden path silently becomes slower than DIY. Detect by timing a sampled off-road service monthly and comparing p50s. And vanity: template count and portal pageviews measure your marketing, not the path.

Counter-metrics keep it honest: platform toil hours per week, cost per service, incident count attributable to the path itself, and lock-in. How many hours to leave. Publish the uncertainty band on every number and tie each one to a roadmap or retirement decision, or you are just collecting.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-23

Evaluate whether a path reduced cognitive load.

Answer

First 90 seconds. "Path" here means a paved road: a supported route from intent to production (scaffold → deploy → observe → change), not a library. The question asks for a judgement, so I'd answer it with a pre-registered decision rule rather than a protocol: the path reduced load if routine-task load drops and novel-failure recovery does not get worse. If routine load drops but incident recovery degrades, load moved to the platform team or to the on-call engineer. That's a shift, not a reduction.

Assumptions I'd state out loud: there is a control (the old path, or a comparable team), real tasks can be instrumented, and you cannot randomise everyone.

Mechanism. Cognitive load splits into intrinsic (the task's own complexity), extraneous (friction the tooling adds) and germane (building the mental model). A path lowers load by chunking steps, removing decisions through defaults, and externalising memory: config generated instead of remembered. It raises load by hiding the model: when the abstraction leaks on a novel failure, the developer reconstructs the model under time pressure, which is the most expensive load there is.

What to measure, and with what.

methodwhat it givescostwhen not to use
NASA-TLX (6 subscales, 0–100, ~5 min)comparable load score per tasklowtoo coarse for a 30-second action
Paas 9-point mental-effort itemone number per task, cheap enough to ask oftenvery lowcannot separate intrinsic from extraneous
Instrumented task telemetry (spans, IDE events)time, errors, context switches, handoffsmediumtells you that, not why
Think-aloud / diarythe mechanism, where the model breakshighsmall n; do not generalise

Pair them: telemetry for the what, Paas for the cheap repeated signal, TLX plus think-aloud on the two tasks that decide it. First deploy and first novel incident.

Sizing. To detect a 1-point shift on the 9-point Paas scale with SD ≈ 1.5, 80% power, α = 0.05 two-sided: n ≈ 16·(1.5/1)² ≈ 36 per arm. Below that you are reading noise.

Failure modes and their signals.

  • Load shifted to platform. Support tickets per service and platform on-call pages rise while developer load falls. Signal: ticket rate up >30% with no change in service count.
  • Abstraction leak. Compare MTTR on known failures against novel ones. If novel-failure MTTR is 3× known-failure MTTR, the path hid the model. (Hypothetical figures, for the shape of the check.)
  • Selection bias. Volunteers are the already-fluent. Signal: the control group's tenure distribution differs from the treatment group's.
  • Survey fatigue. Response rate falls below ~60% and the remaining respondents skew senior.

Conclusion rule. Routine-task load down, novel-failure MTTR flat or better, support load flat → reduced. Routine down, novel-failure MTTR up >25% → shifted. Neither moves → the path is neutral; say so rather than claiming a win.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-18

Operate a golden path as a product.

Answer

Assume "golden path" means the opinionated, supported route from an empty repo to a running, observable service in production: scaffold, CI, deploy, infra defaults, observability, and the upgrade path. Assume it is opt-in, teams can still build their own, because that is what makes "as a product" the right frame. You have users who can leave.

Operating it as a product means four commitments, in this order.

A named owner and a defined user cohort. Not "all engineers": the specific teams whose services fit the path's assumptions, say stateless HTTP services on the shared Kubernetes clusters. Everyone else is explicitly out of scope, and saying so is part of the product.

A published interface with a version and a deprecation policy. The template, the pipeline contract and the runtime defaults are the API. Additive changes ship continuously; breaking changes get a support window and a migration guide.

SLOs on the path itself, not just on the services it produces. Time-to-first-deploy, pipeline success rate, upgrade latency.

A funding line covering maintenance, migration and retirement, not only new features.

Why this matters: the golden path competes with DIY. A team adopts it only if it is the cheapest supported route to production. The moment the path is slower, or its support promise is a lie (template rots, nobody answers the channel) teams fork it and you lose the leverage. The product discipline exists to keep the support promise cheap to keep.

SurfaceOwnerPublished commitmentFailure signal
Scaffold / templatePlatformnew service to first prod deploy ≤ 1 dayscaffold PRs open > 5 days
CI pipelinePlatformp95 build+test ≤ 10 minqueue depth, flake rate
Runtime defaultsPlatformN-2 runtime versions supportedversion skew across fleet
Upgrade pathPlatformbreaking change: 90-day window + codemodservices pinned to old version
SupportPlatformtriage within 1 business dayticket age p90

Worked trace, illustrative numbers: a team scaffolds a service Monday, first deploy Tuesday. Six months later the platform team needs a new runtime major version. Because the path is versioned, they cut v2 of the template, publish a migration guide, keep v1 supported for 90 days, and instrument how many services remain on v1. Adoption of v2 is the metric that says whether the migration is working. If 40% of services are still on v1 at day 60, the migration is too expensive: you fund a codemod or extend the window, and you say so publicly.

Trade-offs. Opt-in versus mandate: mandating the path kills the feedback loop that keeps it good, because you can no longer tell adoption from coercion. Keep it opt-in and read low adoption as a product signal, not a compliance problem. Opinionated versus flexible: every escape hatch is a support surface you now own, so prefer a few well-supported extension points over a configurable everything. Central versus federated contribution: accepting app-team contributions scales the path, but only if acceptance preserves supportability. A contributed module nobody will maintain is worse than no module.

Failure modes and how they surface. Template rot: the scaffold still runs but produces services that fail the current security baseline. Detect by running the scaffold on a schedule in CI and deploying the result. Ticket-queue drift: the platform team becomes a help desk and stops shipping. Track the ratio of support tickets to path releases. Silent fork: teams copy the template and stop taking upgrades. Detect by version skew across the fleet. Over-promised support: you publish an SLO you cannot meet. Detect by SLO burn.

When not to use it: with fewer than roughly ten services or a single team, a golden path is overhead; a documented convention is enough.

Curated: · Written: · Reviewed:

Difficulty: Hard
Q&A-22

Retire a paved road and its tooling.

Answer

Core answer (say this first)

"Retire" here means removing a supported path without orphaning the teams on it. I'd pin three assumptions before starting: a replacement exists and is at least as good on the SLOs consumers actually depend on; I can enumerate the consumers; and I don't control their roadmaps, so the deadline is negotiated, not announced. Given that, retirement is a migration project with an end date, not a delete. The gate is "last consumer migrated and replacement verified", not "traffic is low": low traffic is exactly what a paved road looks like right before someone's quarterly batch job runs on it.

Why it's hard

A paved road is a contract, and consumers have baked it into things you can't see from the platform: CI configs, Terraform modules, runbooks, dashboards, on-call rotations. So the real work is building per-consumer state (who depends on what, and how far along they are) then making the old path fail loudly instead of silently.

Phases, with exit criteria

PhaseExit criterionDetection signalExample duration
AnnounceEvery consumer has a named owner and a ticketCatalog query returns zero consumers with no owner2 weeks
MigrateReplacement passes the old path's SLOs in prodError-budget burn on replacement ≤ old path's60–90 days
FreezeOld path read-only; writes rejected4xx on 100% of writes to old path2 weeks
SunsetZero successful calls for 30 daysAccess logs / audit trail30 days
DeleteInfra, credentials, DNS removedTerraform plan clean; IAM last-used > 90 days1 week

Two artefacts that make it checkable

Arithmetic, illustrative: 40 consuming services × ~2 engineer-days each = 80 engineer-days, which over a quarter is ~1.5 FTE. If the old stack costs $4k/month to run, you're spending roughly $12k of migration to save $48k/year: a fine trade, but not an emergency, and that framing is what gets you the headcount.

On the wire: return Sunset: Wed, 01 Apr 2026 00:00:00 GMT (RFC 8594) plus a Deprecation header on every old-path response, and fail CI when a repo references the retired module. That turns "we emailed everyone" into a check that runs on every pull request.

Failure modes and how you catch them

  • Resurrection: someone re-deploys from a stale pipeline after sunset. Detect with an alert on any 2xx from the old endpoint, or any apply against the retired Terraform module, not with a dashboard nobody watches.
  • Orphaned credentials: the service is gone but its Vault role or IAM user still works. Detect via credential last-used reports; anything used in the last 90 days isn't orphaned, it's live.
  • Zombie state: the app is deleted but the database, bucket or DNS record isn't. Detect with a terraform plan against the retired module and a DNS lookup for the old hostname.

Trade-offs, and when to reverse

The choice is hard cutoff versus long tail. A hard cutoff is cheaper to run and forces migration, but it breaks anyone who missed the notice, so pair it with a documented exception path and a named approver. A read-only copy is the middle option: it costs storage and a little on-call, and it's what you want when the data carries legal or audit retention. Postpone or reverse if the replacement can't hold the old path's p99 or its error budget; retiring onto a worse path just moves the incident.

Curated: · Written: · Reviewed:

Difficulty: Hard