Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Distributed Video Generation Platform

Design a Sora-like platform that durably schedules long-running video-generation jobs, survives infrastructure failures, and publishes complete video artifacts.

Problem statement

For this exercise, assume authenticated clients submit a text prompt and bounded output parameters to generate a short video asynchronously.

The service durably accepts each request, schedules a versioned generation executable that uses at most one GPU on a shared heterogeneous fleet, reports progress, permits cancellation, post-processes the result, and publishes a downloadable video only after integrity checks succeed.

Treat model inference as an opaque, checkpoint-capable workload: do not design the model architecture, training system, or media-quality algorithms.

Jobs can run from 30 seconds to 20 minutes, messages may be delivered more than once, GPU nodes may be preempted or fail, and control-plane services or an availability zone may become unavailable. Interactive and batch requests have different priorities, but admitted batch work must not starve indefinitely.

Cancellation commands are low-volume. Compare a direct RPC or HTTP interruption signal to the current GPU worker with queued or control-plane delivery, while keeping durable cancellation intent authoritative when a worker is unreachable or a completion races the command.

Design the distributed control plane, scheduling boundaries, durable state, failure recovery, and artifact-publication semantics. Model training, prompt-quality evaluation, recommendation feeds, collaborative editing, and video playback or streaming delivery are outside scope.

What to build

  1. For this exercise, an authenticated client can idempotently submit a prompt and bounded generation parameters and receive a durable job ID without waiting for video generation.
  2. For this exercise, a client can read durable job status and ordered progress, and can request best-effort cancellation of non-terminal work.
  3. For this exercise, the platform schedules admitted interactive and batch jobs on compatible GPU capacity and safely resumes or retries eligible work after infrastructure failure.
  4. For this exercise, a successful job exposes exactly one authoritative, integrity-checked video artifact through a short-lived download URL.

At scale

  • Source fact: the interview asks for a Sora-like video-generation design, excludes machine-learning details, and emphasizes distributed-system behavior and failure models.
  • Practice assumption: accept up to 500,000 generation jobs per day with peaks of 200 submissions per second and as many as 25,000 queued or running jobs across interactive and batch priority classes.
  • Practice assumption: jobs run from 30 seconds to 20 minutes on heterogeneous GPU shapes; durable acceptance completes within 500 milliseconds at p95, status reads complete within 200 milliseconds at p95, and admitted interactive jobs normally begin within 60 seconds at p95 when healthy capacity is available.
  • Practice assumption: internal delivery is at least once, accepted job state survives a process or availability-zone failure, retries pin the executable version, portable checkpoints are retained for 24 hours, and successful artifacts averaging up to 100 MB are retained for 30 days.
  • The source reports low cancellation volume; direct worker signaling may optimize interruption latency, but durable cancellation state and completion-race rules must remain correct if that signal is lost.