KatInterview

Build a Multi-Team GPU Cluster Platform for Distributed Training

System DesignModel answer
HardModel answerSystem Designml-infrastructuregang-schedulingfault-tolerance

Last updated

Design a shared platform where several teams run distributed GPU training jobs, with all-or-nothing placement, fair quotas, fast failure recovery and a storage layer that avoids I/O stalls.

Context

A self-driving vehicle organization trains many kinds of models: large vision transformers, trajectory forecasting models, and reinforcement-learning agents in simulation. Four teams (Perception, Prediction, Controls, Simulation) all draw on one pool of accelerators. Today each team hand-manages its own machines, and utilization and reliability are poor.

You are asked to design a shared training platform on which engineers can launch, monitor and recover distributed training runs without caring which machines they land on.

Functional requirements

  • Gang scheduling and placement. Multi-node jobs (for example PyTorch DDP or DeepSpeed) must have every worker start together or not at all. Placement should respect network topology: GPUs within one host first, then hosts under the same leaf switch.
  • Quotas and fairness. Each team has a guaranteed share. Idle capacity can be borrowed by others, and borrowed capacity can be reclaimed through priority-based preemption.
  • Reproducibility. Every run is bound to an immutable dataset snapshot and a specific code commit.
  • Fault tolerance. Detect failed workers or nodes, remove unhealthy nodes from service, and resume from the most recent valid checkpoint with little lost work.
  • Experiment tracking. Expose live metrics (loss, throughput, GPU utilization), artifacts and lineage.

Non-functional requirements

  • 4,000+ GPUs across 500+ hosts; hundreds of concurrent runs; about 10,000 job launches per day.
  • Node failure detected within 10 seconds; affected distributed job running again within 90 seconds.
  • Average idle overhead on allocated GPUs (between checkpoints or job transitions) under 5%.

What to cover

  1. High-level architecture of the control plane (API, scheduler/resource manager, node agents, experiment store).
  2. The gang-scheduling and quota engine: data model, fair-share algorithm, preemption policy, topology-aware placement.
  3. The failure lifecycle, from a missed heartbeat through draining, health checks, rescheduling and checkpoint reload.
  4. The storage design for data reads and synchronous checkpoint writes (object store versus parallel file system or local cache) so that I/O does not become the bottleneck.

State your assumptions, give back-of-the-envelope numbers, and discuss trade-offs.

Hints

Hint 1

Start with numbers: heartbeats per second, job launches per second, checkpoint size per node, and metric points per second. They show which parts are actually hard (placement quality and recovery time, not raw throughput).

Hint 2

A default one-pod-at-a-time scheduler can deadlock two large jobs that each hold half the nodes they need. Think about admitting a whole group atomically, reserving nodes for large jobs, and only backfilling small jobs that finish before the reservation.

Hint 3

Break the 90-second recovery budget into phases (detect, isolate, replace, start, rendezvous, reload) and decide what must be pre-arranged, such as hot spare hosts, pre-pulled images and node-local checkpoint copies, to fit each phase.

Hint 4

Separate durable storage from fast storage: an object store as the source of truth, and local NVMe or a parallel file system as a cache. Consider asynchronous upload of checkpoints and a commit marker so that a half-written checkpoint is never used for resume.