KatInterview

Scheduling Platform for Long-Running Multi-GPU Render Jobs

System DesignModel answer
HardModel answerSystem Designjob-schedulinggpu-clusterfair-share

Last updated

Design a fault-tolerant, multi-tenant scheduler that places long, opaque, gang-scheduled GPU jobs on a 10,000-GPU fleet while keeping utilization high and recovering from node failures.

Problem

You are building the backend for a text-to-video generation product. Each request launches a heavy, black-box job on a specialized GPU host (for example, a machine with 8 high-end GPUs). A single job runs for roughly 2 to 45 minutes. GPUs are scarce and costly, so every idle GPU-minute matters and no tenant should be able to monopolize the fleet.

Design the platform that accepts requests, decides which hardware runs each one, supervises execution, and delivers the finished video.

Functional requirements

  • Job lifecycle API: submit a job (model parameters, prompt, callback URL), poll its status, stream intermediate progress, and cancel it.
  • Multi-tenant scheduling: several priority tiers (for example Enterprise vs. Free) plus fair-share behavior so that a heavy user cannot starve others.
  • Gang scheduling: some jobs need several GPUs at once, either all 8 on one host or spread over several hosts. The whole set must be granted atomically.
  • Checkpointing and resiliency: a host crash or thermal throttling mid-job must not throw away all progress.

Non-functional requirements

  • Cluster-wide GPU utilization above 85%.
  • 10,000+ GPUs and about 100,000 jobs per day.
  • Node failures and network partitions must never corrupt job state or leave leaked (dangling) GPU allocations.

What to cover

  1. API and data model, including the job state machine (QUEUED, ASSIGNED, RUNNING, CHECKPOINTING, COMPLETED, FAILED).
  2. Architecture: gateway, scheduler, queueing layer, per-host agents, artifact storage.
  3. Scheduling strategy: fair queuing (e.g., Dominant Resource Fairness or a weighted deficit scheme), gang reservation, backfilling.
  4. Fault tolerance: heartbeats, health checks, preemption, checkpoint storage, and cleanup of stuck jobs.

State your assumptions and back-of-envelope numbers as you go.

Hints

Hint 1

Do the arithmetic first: jobs per day times GPU-hours per job versus GPUs times 24 hours. It tells you whether the hard part is request throughput or packing and wasted work.

Hint 2

Separate 'which job deserves GPUs next' (fairness) from 'where does it fit' (placement). That separation stops a large gang that cannot yet be placed from blocking everyone behind it.

Hint 3

For safety under failures, think leases with TTLs, monotonically increasing fencing tokens, and a single source of truth for GPU ownership that is changed only through atomic transactions.

Hint 4

Opaque jobs still expose natural checkpoint boundaries (such as denoising steps). Consider how checkpoints also make backfill and preemption cheap.