04QuestionsML model distribution
04 · Worked prompt
ML model distribution
Design versioned artifacts, regional rollout, integrity checks, caching, rollback, and fleet convergence.What a passing answer must show
100 points · 45 minutes
- 20pts
Scope the problem
0–5 minPrioritize the core flows, state the scale, and name the non-goals.
- 15pts
Define contracts
5–10 minIdentify durable entities, APIs, idempotency, and the source of truth.
- 30pts
Complete the diagram
10–25 minTrace one write path and one read path. Label the commit boundary and async work.
- 20pts
Lead one deep dive
25–38 minChoose the highest-risk trade-off and explain the mechanism, alternative, and cost.
- 15pts
Prove reliability
38–45 minWalk a failure, recovery, metric, bottleneck, and evolution path.
One complete box-and-arrow design
Design versioned artifacts, regional rollout, integrity checks, caching, rollback, and fleet convergence.

Write
Release operators enters through Rollout API. Rollout controller owns validation and commits the durable record to Release/rollout DB.
Propagate
Rollout event stream separates the committed write from background work. Host agents can retry safely while it builds Fleet convergence index.
Read
Convergence service serves from Fleet convergence index, then checks authoritative state whenever freshness, policy, or correctness requires it. It also consults Artifact CDN/store as an explicit dependency.
Say this first: A signed release manifest defines desired state; pull-based agents converge fleets through verified cohorts.
Open the full whiteboard ↗Explain every boundary before adding more boxes.
A signed release manifest defines desired state; pull-based agents converge fleets through verified cohorts.
Design versioned artifacts, regional rollout, integrity checks, caching, rollback, and fleet convergence.
Multi-GB artifacts · thousands hosts · bandwidth caps · staged rollback. State average and peak load, stored bytes, bandwidth or open connections, and the growth horizon before choosing a partitioning strategy.
End-to-end walkthrough
Trace the architecture in this order.
- 01
Enter and classify the request
Release operators → Rollout APIApprove, canary, rollback enters over HTTPS / RPC. Rollout API handles identity, admission, routing, and request context; it deliberately does not own domain truth.
- 02
Validate, then cross the commit boundary
Rollout API → Rollout controller → Release/rollout DBRollout controller receives the command, checks invariants and retry identity, then uses commit to update Release/rollout DB. The user-visible mutation is accepted only after this boundary succeeds.
- 03
Move replayable work off the request path
Rollout controller → Rollout event stream → Host agents → Fleet convergence indexRollout controller emits publish after commit; Host agents uses consume and project / update to build Fleet convergence index. Consumers must tolerate duplicate delivery and stale retries because this path is asynchronous.
- 04
Serve reads from the right authority
Rollout API → Convergence service → Fleet convergence index / Release/rollout DBConvergence service uses optimized read for the common, read-optimized path and strong read when correctness or repair requires authoritative state. The API must state the freshness promise instead of hiding it.
- 05
Contain the dependency boundary
Host agents → Artifact CDN/storedigest-verified pull crosses into Artifact CDN/store. Treat timeouts as ambiguous, use a deadline and idempotent retry or reconciliation, and keep the core state recoverable when the dependency is unavailable.
- 06
Deliver without changing the source of truth
Host agents → Inference router → Release operatorsHost agents uses weighted routing; Inference router returns updates over stream / push. Sequence IDs, reconnect cursors, and backpressure make delivery resumable without turning a socket into durable state.
Ownership ledger
Why each box exists—and what it must defend.
| Component | Owns | Why it exists | Interviewer probe |
|---|---|---|---|
| Rollout APIAuth + policy gates | Identity, admission, routing | Protects the system edge and attaches trusted context before domain work begins. | Timeout budgets, quotas, regional routing |
| Rollout controllerCohorts + desired version | Write invariants and retry identity | Serializes or conditionally applies state changes before acknowledging success. | Concurrent writes, deduplication, hot ownership |
| Release/rollout DBManifest + cohort state | Authoritative durable state | Provides the one record used to resolve disputes, recover, and rebuild projections. | Partition key, replication, consistency |
| Rollout event streamDesired-state changes | Durable asynchronous handoff | Absorbs bursts and lets slow or optional work retry independently of the request. | Ordering key, lag, retention, dead letters |
| Host agentsPull, verify, load, report | Replayable processing | Runs expensive, fan-out, or side-effecting work with leases and bounded retries. | Idempotency, poison work, autoscaling |
| Fleet convergence indexVersion + health by cohort | Rebuildable query state | Shapes data for the dominant reads without weakening the write-side invariant. | Freshness, versioning, rebuild time |
| Convergence serviceHosts + quality gates | Read composition and freshness policy | Chooses authoritative or derived state and returns a stable client contract. | Fan-out, cache policy, partial results |
| Artifact CDN/storeSigned model chunks | External capability, not local truth | Keeps a specialized or third-party concern behind a replaceable contract. | Ambiguous timeout, circuit breaking, fallback |
| Inference routerTraffic shift by cohort | Connection and delivery state | Separates open connections and fan-out pressure from durable domain state. | Reconnect, ordering, slow consumers |
Physical design
Name the database, shard key, indexes, and guarantees.
- Database + storage
- Object storage is artifact truth; PostgreSQL stores manifests/rollouts; CDN and peer caches distribute content-addressed chunks.
- Partitioning / sharding
- Shard chunks by digest prefix and rollout control by region/cohort. One immutable manifest names all bytes for a version.
- Indexes
- Unique model/version, chunk digest, rollout cohort/state, and node receipt by node/version.
- Replication + consistency
- Manifest/rollout transitions are versioned; nodes activate only after complete checksum verification. Node status converges asynchronously.
- Cache, queue + recovery
- CDN caches immutable chunks indefinitely; rollout stages download, verify, warm, activate, and rollback idempotently.
- Capacity math
- Estimate model/chunk GB, node count, rollout deadline, concurrent egress, hit ratio, and rollback time.
- Alternative rejected
- Whole-file pushes from one control server duplicate bytes and bottleneck egress; content-addressed chunks make retry/dedup cheap.
Deep-dive candidates
Pick one risk and explain the mechanism, alternative, and cost.
Artifact transfer
Chunk by digest, resume partial downloads, and deduplicate across model versions
Restarting multi-GB downloads wastes bandwidth and delays recoveryActivation
Load the new model side-by-side and switch an atomic local pointer after warmup
Download completion is not serving readinessRollback
Retain previous known-good artifacts and runtime compatibility until the rollout window closes
Rollback cannot depend on re-downloading during an incidentFailure pressure test
Show detection, containment, recovery, and evidence.
Corrupt chunk
Reject by digest and refetch from another cache or origin
integrity failuresBad canary
Stop cohort expansion and atomically return traffic to previous model
gate breach to rollback timeCache stampede
Pre-stage by region and rate-limit origin fetches
origin egress and cache fill concurrency- Functional requirements and non-goals
- Peak traffic, storage, bandwidth, and growth
- Entities, APIs, idempotency, and pagination
- Source of truth and consistency promise
- Partition key, replicas, caches, and hot spots
- Retries, backpressure, failover, and reconciliation
- Latency, saturation, correctness, and recovery metrics
- Security, migration, cost, and multi-region evolution
A four-part talk track
- Scope
“I’ll prioritize distribute multi-gigabyte models globally and verify integrity and runtime compatibility.”
- Scale
“The design changes around multi-gb artifacts · thousands hosts · bandwidth caps · staged rollback.”
- Decision
“Pull agents converge robustly; push orchestration gives tighter timing with more failure modes.”
- Risk
“The first failure I want to pressure-test is: Partial artifacts or a bad model can create fleet-wide inconsistency.”
Reference details
Open these only after you can explain the diagram above without reading.
01Requirements and state lifecycle4 requirements
- Distribute multi-gigabyte models globally
- Verify integrity and runtime compatibility
- Roll out gradually with rapid rollback
- Measure fleet convergence and model health
Each transition must be durable, observable, and safe to retry.
02Data model and APIs4 entities · 3 interfaces
Core entities
release_id, artifact_digest, runtime_contract, stateOwner: Registrydigest, size, chunks, signatureOwner: Object storerelease_id, cohorts, gates, current_stageOwner: Rollout controllerhost_id, desired_release, active_release, healthOwner: Serving agentExternal interfaces
/v1/model_releasesRegister a signed immutable artifact
/v1/model_releases/{id}/rolloutsCreate a staged cohort plan
/internal/hosts/{id}/statusReport verified, loaded, active, and health state
03Deep dives and trade-offsChoose one
Artifact transfer
Chunk by digest, resume partial downloads, and deduplicate across model versions
Restarting multi-GB downloads wastes bandwidth and delays recoveryActivation
Load the new model side-by-side and switch an atomic local pointer after warmup
Download completion is not serving readinessRollback
Retain previous known-good artifacts and runtime compatibility until the rollout window closes
Rollback cannot depend on re-downloading during an incident04Failures, recovery, and evidence3 scenarios
Corrupt chunk
Reject by digest and refetch from another cache or origin
integrity failuresBad canary
Stop cohort expansion and atomically return traffic to previous model
gate breach to rollback timeCache stampede
Pre-stage by region and rate-limit origin fetches
origin egress and cache fill concurrency05What makes the answer seniorInterviewer signals
- Separate artifact arrival, model load, and traffic activation
- Fleet convergence needs a denominator and deadline
- Model quality gates and system health gates both matter
- Primary trade-off: Pull agents converge robustly; push orchestration gives tighter timing with more failure modes.
Can you redraw it from memory?
- Name the source of truth.
- Trace the write and read paths.
- Defend one trade-off.
- Recover from one failure.