KatInterview

Building an Async Prompt-to-Clip Rendering Platform on a GPU Fleet

System DesignModel answer
MediumModel answerSystem Designasync-jobsgpu-schedulingjob-queue

Last updated

Design a backend that accepts text prompts, renders short AI-generated videos on a pool of expensive GPUs, and survives bursts, worker crashes, and uneven hardware.

Design a Prompt-to-Clip Rendering Platform

You are asked to design the backend for a product where users type a text description and get back a short generated video. Rendering is performed by a large generative model that runs on expensive GPU machines, and each clip takes anywhere from tens of seconds to several minutes.

What the product must do

  • A user submits a prompt along with a preferred clip length (for example 5 or 10 seconds).
  • The service immediately returns a unique job identifier.
  • The user can check progress at any time, and when rendering is done, receives a link to download the clip.

Operating conditions

  • Traffic is bursty. Demand can jump many times above normal with little warning.
  • A single render is slow, and GPU time is the dominant cost of the whole system.
  • The service must stay available and must not lose jobs it has already accepted.
  • The GPU fleet is mixed: different card types, memory sizes, and node shapes.

Areas your design should address

  1. API and job lifecycle: how submission, status checks (polling and/or callbacks), and retrieval work.
  2. Scheduling: how queued, long-running jobs get matched to a mixed GPU fleet.
  3. Load spikes: what happens when request volume suddenly rises tenfold.
  4. Storage and delivery: where finished video lives and how it reaches users.
  5. Failures: how you notice a worker dying mid-render and recover without losing or double-running work.

What to deliver

Walk through your answer as you would on a whiteboard:

  • A text description of the high-level architecture.
  • The data flow for a single job from submission to download.
  • A discussion of the trade-offs between throughput (GPU efficiency) and latency (time to a finished clip).

State your own scale assumptions up front and use them to justify your choices.

Hints

Hint 1

Start by estimating jobs per day, render time per clip, and the resulting number of busy GPU nodes. Those numbers show that GPU utilization is the cost driver and that you cannot simply scale GPUs 10x in minutes.

Hint 2

Because the fleet cannot grow quickly, think about a spike in terms of buffering, admission control, priority classes and graceful quality degradation, with autoscaling as the slowest lever.

Hint 3

For crash recovery, think about leases with heartbeats, conditional (versioned) state transitions in a durable job store, idempotency keys on submission, and optional checkpoints so a retry does not always restart from zero.