InterviewsVector
Arc 10
Systems labAdvanced115 min estimateOriginal publication

The Model-Serving Control Plane

Build a reconciled control plane that turns an immutable serving revision into bounded placement and rollout decisions without confusing orchestration health with request-path correctness.

Authorship
InterviewsVector
Published / updated
2026-09-26 / 2026-09-26
Review status
Artifact tests passing · primary sources recorded

Original InterviewsVector teaching. Executable artifacts are deterministic illustrative audits with focused tests and recorded primary sources; they do not claim hardware benchmarks, distributed execution, production deployment, capacity certification, or universal model quality.

The decision in one pass

Separate desired-state orchestration from request execution. The serving data plane should admit, batch, execute, stream, cancel, and report requests; the control plane should bind an immutable model and configuration revision, place replicas, load artifacts, assess readiness, reconcile desired state, meter rollout traffic, and retain a proven rollback route. Model each transition as an idempotent comparison between versioned desired state and observed evidence, not as a sequence of hopeful imperative steps. A rollout may advance only when the target reaches its declared desired replica allocation, model loads and health evidence are fresh, placement and autoscaling are ready, the previous revision remains fully available, capacity covers both desired allocations, and request-path error and latency gates pass. Regressions roll traffic back, incomplete readiness holds traffic, and reaching the contract's traffic ceiling produces a hold rather than a false no-op advance. This control plane can decide what should happen next; it cannot make request execution correct or make Kubernetes perform an automatic rollback.

Why this matters

Serving failures often live between individually reasonable controllers. A rollout raises desired replicas while an autoscaler lowers them, model loading consumes the same memory used for surge capacity, a health endpoint becomes ready before representative inference succeeds, or a deployment reports stalled progress while traffic continues to move. Explicit state, identity, evidence age, capacity ownership, and transition rules make these interactions reviewable. Without them, operators cannot tell whether the system is converging, frozen, or silently exposing a target that cannot be rolled back.

You will be able to

  • Separate control-plane reconciliation from the latency-sensitive inference data plane.
  • Bind placement, model loading, health, autoscaling, traffic, and rollback evidence to one immutable serving revision and policy scope.
  • Design idempotent desired-versus-observed transitions with explicit advance, hold, and rollback outcomes.
  • Reason about rollout surge and rollback capacity using desired allocations rather than only currently ready replicas.
  • Defend health, model-repository, autoscaling, and rollout boundaries without attributing guarantees to the underlying platform that it does not provide.

Your Vector Loop for this lab

  1. 01

    Model

    Map immutable model and configuration identity, desired replicas, placement constraints, health contracts, autoscaling signals, traffic stages, surge capacity, rollback route, ownership, and evidence age.

  2. 02

    Derive

    Derive a desired-versus-observed state machine with explicit invariants for loading, readiness, capacity, traffic advancement, holds, regression rollback, and terminal or policy-ceiling behavior.

  3. 03

    Build

    Build an idempotent deterministic rollout decision over invented, digest-bound evidence; keep all cluster and traffic mutation outside the artifact.

  4. 04

    Stress

    Inject partial model loads, target under-readiness, stale health, placement drift, autoscaler conflict, desired-capacity overcommit, telemetry regressions, rollback loss, duplicate reconciliation, and a rollout already at its policy ceiling.

  5. 05

    Operate

    Observe reconciliation age, desired and ready replicas by revision, model-load outcomes, health freshness, traffic fraction, request tails and errors, autoscaler state, surge headroom, rollback readiness, and controller conflicts.

  6. 06

    Defend

    Defend the control/data-plane boundary, transition idempotence, evidence provenance, capacity arithmetic, rollback trigger, and the exact platform behavior your design does not assume.

Keep desired state out of the request path

A useful boundary is temporal as well as architectural. The data plane handles work whose correctness and latency are visible to callers: admission, routing, batching, model execution, streaming, cancellation, and request telemetry. The control plane handles slower convergence: revision registration, placement, artifact loading, desired replica counts, health policy, autoscaling intent, traffic stages, and rollback. The request path consumes an already-authorized routing state; it should not synchronously decide placements or fetch a mutable model alias.

ConcernControl-plane responsibilityData-plane responsibility
revisionresolve immutable model and configuration digestsreport the exact loaded revision on every request
capacitydeclare desired allocation and placementadmit or shed against available execution capacity
healthinterpret versioned readiness and rollout evidenceproduce representative request-path signals
trafficauthorize a bounded routing fractionenforce that routing decision without widening it
recoveryretain and select a qualified previous revisiondrain, cancel, and stop work safely

Reconcile one versioned contract at a time

A reconciler repeatedly reads desired and observed state, validates scope and freshness, computes a next decision, and records it with a content identity. The operation must be idempotent: replaying the same canonical evidence yields the same answer and does not double-advance traffic. Separate readiness evidence from performance regression evidence because they imply different actions. Missing readiness holds the current fraction; a demonstrated request regression rolls back to the previous revision.

  1. 01Resolve identity and authorityBind model, configuration, placement, health, autoscaling, rollback, and fixture or environment scopes before comparing any observations.
  2. 02Reconcile desired allocationRequire the target and rollback revisions to reach their declared desired state, and reserve surge capacity from desired allocations rather than transient ready counts.
  3. 03Qualify model loading and healthUse bounded attempts, success rates, fresh health, and representative inference evidence; do not equate process liveness with a correctly loaded model.
  4. 04Decide exactly one transitionRollback on hard request regressions, hold on incomplete or ceiling-bound evidence, and otherwise advance to one capped traffic fraction.

declared_surge = target.desired_replicas + previous.desired_replicas ≤ reserved_ready_capacity

Ready replicas are an observation, not the allocation request. Using only ready counts can approve a rollout whose controllers are still converging toward an impossible desired total.

Design rollout, autoscaling, and health as one feedback system

Deployment, autoscaling, placement, model loading, and traffic controllers can each be locally correct while their combined loop oscillates. Define who owns each field, the measurement window, stabilization and cooldown behavior, minimum capacity per rollout stage, and precedence during rollback. The autoscaler should not erase canary capacity, and rollout surge should not consume rollback headroom. A health signal should identify the revision and remain fresh across the same observation windows used by the traffic decision.

InteractionHidden failureContract response
rollout × autoscalingcanary scales to zero or noisy latency drives oscillationstage-specific minima, signal ownership, stabilization, explicit hold
loading × placementartifact loads on an incompatible or memory-starved nodedigest, resource, device, locality, and load-result evidence
health × trafficready endpoint passes before representative inferencelayer liveness, readiness, and request-path qualification
surge × rollbacknew desired allocation consumes the old revision's escape capacityreserve both desired allocations before advancing
progress × rollbackstalled deployment is mistaken for automatic recoverycontroller detects the condition and explicitly authorizes rollback

Make the next transition a reviewable artifact

The reference artifact reconstructs exact frozen records, verifies their content digests and shared scope, and returns one local decision. It rejects booleans masquerading as counts, string subclasses, non-finite floats, constructor-bypassed records, stale contract bindings, desired-capacity overcommit, incomplete rollback state, and traffic above the policy boundary. It never contacts a cluster, changes routing, or claims deployment success.

courses/ai-engineering/reference-impl/model_serving_control_plane/rollout_plan.py
1def plan_rollout(contract: RolloutContract, evidence: RolloutEvidence) -> RolloutPlan:
2 contract = validate_record(contract, RolloutContract)
3 evidence = validate_record(evidence, RolloutEvidence)
4 if evidence.scope != contract.scope or evidence.contract_content_id != contract.content_id:
5 raise ValueError("evidence belongs to another rollout contract")
6
7 # Reconcile identity, desired allocation, readiness, rollback, and request gates.
8 # Regressions roll back; incomplete or ceiling-bound evidence holds.
9 # Only fully qualified evidence advances one capped traffic stage.

Expected output

example=illustrative_only
decision=ADVANCE_BOUNDED_ROLLOUT
target_revision=model-v18;previous_revision=model-v17
target_ready=4/4;load_success_rate=1.000
error_rate=0.002;p95_latency_ms=180.000
next_traffic_fraction=0.200
claim=LOCAL_CONTROL_PLANE_AUDIT_NOT_DEPLOYMENT

Verify: python3 -m unittest discover -s courses/ai-engineering/reference-impl/model_serving_control_plane -p 'test_*.py' -v

Treat model loading and control authority as security boundaries

A model repository is executable-system input, not a passive file share. Restrict who can publish revisions, verify artifact and configuration digests before loading, separate tenant namespaces, make provenance auditable, and minimize dynamic repository mutation. Triton's documentation warns that dynamic model loading can expose arbitrary-code execution risk when a repository is writable by an untrusted party; disable or tightly authorize repository control when the workflow does not require it.

  • Reject target evidence whose model, configuration, scope, or policy identity differs from the approved revision.
  • Expire health and load observations so a once-healthy replica cannot authorize a later rollout after drift or restart.
  • Protect routing and rollback commands with least privilege, authenticated provenance, replay resistance, and an append-only decision trail.
  • Exercise corrupt artifacts, partial downloads, incompatible runtimes, slow loads, poisoned health, unavailable registries, controller restarts, and concurrent reconciliation.
  • Keep the previous revision warm enough to recover, and prove rollback routing rather than inferring it from object existence.

Operate from a transition ledger

Persist each desired state, canonical observation set, decision, actor or controller identity, and resulting state in a transition ledger. Join data-plane metrics by model and configuration revision, rollout stage, placement, and policy scope. Alert on reconciliation age, repeated holds, desired-ready gaps, load failures, stale health, controller write conflicts, rollback-route loss, surge exhaustion, and request regressions. Rehearse controller restart and duplicated events: recovery should reconstruct state from durable records rather than from an in-memory step counter.

  1. 01Qualify before exposureVerify immutable identity, placement, desired readiness, load success, representative health, rollback route, and capacity before moving traffic.
  2. 02Observe through complete windowsUse minimum sample and time windows that cover warmup, representative request shapes, autoscaler reaction, and downstream behavior.
  3. 03Stop on ambiguous ownershipIf multiple controllers can write replicas, routing, or revision aliases without precedence, hold and repair the authority model.
  4. 04Close the rollout deliberatelyDistinguish a bounded policy ceiling from completion, then require a separately authorized promotion or terminal state before retiring rollback capacity.

Operate at three altitudes

Production lens

  • — Correlate desired and ready replicas, model-load attempts, health freshness, traffic, request quality and tails, autoscaling, placement, surge headroom, and rollback readiness by immutable revision and policy scope.
  • — Persist idempotent transition evidence and rehearse process restart, duplicate observations, partial loads, capacity loss, controller conflict, regression rollback, and rollback-route failure.
  • — Keep cluster mutation outside the decision function, authorize it separately, and verify that observed state converges to the recorded decision before another stage can advance.

Staff lens

  • — Own rollout as a coupled feedback and authority system across deployment, autoscaling, scheduling, artifact supply chain, health, routing, capacity, observability, and incident response.
  • — Demand explicit desired-state arithmetic, evidence provenance, hold semantics, rollback capacity, and platform-behavior boundaries before accepting a control-plane design.

Interview defense

Design a model-serving control plane that can roll out a large revision while autoscaling remains enabled.

I would separate an immutable revision and desired-state reconciler from request execution. The revision binds model and configuration digests, placement, resource and health policy, rollout stages, and rollback identity. Each reconciliation validates fresh observed evidence, requires the target to reach its declared desired replicas, reserves capacity for the target and fully ready previous revision, verifies model loads and representative health, and reads request-path latency and error windows. Request regressions roll back; missing placement, autoscaler, health, capacity, observation, or rollback evidence holds; otherwise one idempotent decision advances to a capped fraction. The autoscaler has explicit ownership and stage-specific floors so it cannot erase canary or rollback capacity. I would ledger every transition, join telemetry by revision, test duplicate reconciliation and controller restart, and state explicitly that a Deployment progress failure does not itself perform rollback.

Expect the interviewer to press on

  • — Why should surge capacity use desired rather than currently ready replicas?
  • — How do you prevent an autoscaler from invalidating a rollout stage?
  • — What is the difference between readiness and rollout qualification?

Misconceptions to remove

“The deployment object is the serving control plane.”

It is one controller and resource model. Model identity, loading, representative health, traffic authorization, autoscaling ownership, rollback evidence, and request-path gates still need an explicit contract.

“Four ready target replicas are enough even if the desired state requests one hundred.”

Ready count must be interpreted against declared desired allocation, and surge capacity must reserve the desired target plus rollback allocation before traffic advances.

“A progress deadline makes Kubernetes automatically restore the old version.”

The Deployment reports a stalled condition; an operator or higher-level controller must interpret it and execute rollback policy.

Check your model

1. Why must the request path report immutable revision identity?

Without it, health, latency, errors, quality, rollout stage, placement, and rollback evidence cannot be attributed to the exact model and configuration that served the request.

2. When should incomplete evidence roll back rather than hold?

The contract should distinguish missing readiness from demonstrated harm. This artifact holds on incomplete readiness and rolls back on explicit request error or latency regressions.

3. Why is traffic at the policy ceiling not another advance?

The computed next fraction would equal the current fraction, so labeling it an advance creates a false transition. It should hold or enter a separately defined completion/promotion state.

Prove the mechanism

Extend the rollout contract with explicit health-observation timestamps and a terminal promotion authorization. Add stale-clock, duplicated-reconciliation, and policy-ceiling cases without adding cluster mutation.

Add a production constraint

Design a multi-region serving control plane with immutable revision supply, locality-aware placement, stage-specific autoscaling, regional health and traffic gates, rollback capacity, controller leader failure, audit trails, and a recovery proof for conflicting observations.

Artifact: Model-serving control-plane rollout contract

courses/ai-engineering/reference-impl/model_serving_control_plane/rollout_plan.py

Download reference implementation

Primary references and next links

References

  1. 1. Deployments

    Kubernetes. Official controller documentation for desired replicas, rolling updates, progress conditions, and the explicit limitation that a stalled Deployment does not automatically roll back.

  2. 2. Horizontal Pod Autoscaling

    Kubernetes. Official control-loop reference for replica recommendations, missing metrics, stabilization, and scaling behavior that must be composed with rollout ownership.

  3. 3. Deploying Triton

    NVIDIA Triton Inference Server. Official deployment guidance covering health endpoints, metrics, model control, Kubernetes integration, and dynamic model-loading security considerations.

Continue through the graph

Glossary: control plane · data plane · reconciliation · desired state · readiness · rollout · surge capacity · autoscaling · rollback · immutable revision