Bird
Raised Fist0
HLDsystem_design~20 mins

Video upload and processing pipeline in HLD - Practice Problems & Coding Challenges

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Challenge - 5 Problems
🎖️
Video Pipeline Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Architecture
intermediate
2:00remaining
Identify the correct component for video upload handling

In a video upload and processing pipeline, which component is primarily responsible for receiving and temporarily storing the uploaded video before processing?

AVideo ingestion service that accepts and stores raw video files
BLoad balancer distributing incoming upload requests
CVideo transcoding service that converts video formats
DContent delivery network (CDN) caching processed videos
Attempts:
2 left
💡 Hint

Think about the first step after a user uploads a video file.

scaling
intermediate
2:00remaining
Scaling the video transcoding service

Your video processing pipeline needs to handle a sudden spike of 10,000 video uploads per hour. Which approach best helps scale the transcoding service to handle this load efficiently?

AImplement a distributed queue and multiple transcoding worker instances that scale horizontally
BUse a single powerful server with high CPU and memory for transcoding
CStore all videos in a database and transcode them sequentially
DTranscode videos directly on the user's device before upload
Attempts:
2 left
💡 Hint

Consider how to handle many videos at the same time without delay.

tradeoff
advanced
2:00remaining
Choosing between synchronous and asynchronous processing

What is the main tradeoff when deciding to process video uploads synchronously (immediate processing) versus asynchronously (delayed processing via queue)?

ASynchronous processing is cheaper; asynchronous requires expensive hardware
BSynchronous processing always produces higher video quality; asynchronous reduces quality
CSynchronous processing reduces latency but limits scalability; asynchronous improves scalability but adds delay
DSynchronous processing requires no storage; asynchronous requires permanent storage
Attempts:
2 left
💡 Hint

Think about user wait times and system load.

🧠 Conceptual
advanced
2:00remaining
Understanding video chunking in upload pipelines

Why is chunked video upload commonly used in large video upload pipelines?

AIt converts video format on the client side before upload
BIt allows resuming uploads after network interruptions without restarting from the beginning
CIt encrypts each chunk separately for security
DIt compresses the video automatically during upload
Attempts:
2 left
💡 Hint

Consider what happens if the internet connection drops during a large upload.

estimation
expert
3:00remaining
Estimating storage needs for video processing pipeline

Your system expects 5,000 video uploads daily. Each raw video averages 500 MB. After transcoding, each video produces 3 different quality versions averaging 100 MB each. Videos are stored for 30 days before deletion. What is the approximate total storage needed for 30 days?

AApproximately 1.35 petabytes
BApproximately 225 terabytes
CApproximately 45 terabytes
DApproximately 675 terabytes
Attempts:
2 left
💡 Hint

Calculate raw + processed storage per day, then multiply by 30 days.

Practice

(1/5)
1. Which component in a video upload and processing pipeline is primarily responsible for converting raw uploaded videos into multiple formats suitable for playback?
easy
A. Content delivery network (CDN)
B. Video processing service
C. Metadata database
D. Upload service

Solution

  1. Step 1: Identify the role of each component

    The upload service handles receiving videos, the metadata database stores info, and CDN delivers content. The processing service converts videos.
  2. Step 2: Match the function to the question

    Converting raw videos into multiple formats is done by the video processing service to ensure compatibility.
  3. Final Answer:

    Video processing service -> Option B
  4. Quick Check:

    Conversion = Video processing service [OK]
Hint: Processing means converting video formats [OK]
Common Mistakes:
  • Confusing upload service with processing
  • Thinking CDN does video conversion
  • Assuming metadata database handles video files
2. Which of the following is the correct sequence of steps in a typical video upload and processing pipeline?
easy
A. Storage -> Upload service -> Video processing -> Metadata update
B. Video processing -> Upload service -> Metadata update -> Storage
C. Metadata update -> Upload service -> Storage -> Video processing
D. Upload service -> Video processing -> Storage -> Metadata update

Solution

  1. Step 1: Understand the logical flow

    Users first upload videos, then videos are processed, stored, and metadata is updated last.
  2. Step 2: Match the sequence to options

    Upload service -> Video processing -> Storage -> Metadata update correctly shows upload first, then processing, storage, and metadata update.
  3. Final Answer:

    Upload service -> Video processing -> Storage -> Metadata update -> Option D
  4. Quick Check:

    Upload first, then process, store, update metadata [OK]
Hint: Upload happens before processing and storage [OK]
Common Mistakes:
  • Starting with processing before upload
  • Updating metadata before storage
  • Mixing storage and upload order
3. Consider a video upload pipeline where the upload service places video metadata into a queue for processing. If the processing service crashes and stops consuming messages, what will happen to the queue and user experience?
medium
A. Upload service will reject new uploads immediately
B. Queue will empty quickly; users get instant processing
C. Queue will fill up, causing delays; users see slow processing
D. Metadata database will automatically process videos

Solution

  1. Step 1: Understand queue behavior when consumer stops

    If the processing service crashes, it stops consuming messages, so the queue fills up with unprocessed metadata.
  2. Step 2: Impact on user experience

    Since processing is delayed, users experience slow video availability or processing delays.
  3. Final Answer:

    Queue will fill up, causing delays; users see slow processing -> Option C
  4. Quick Check:

    Processing down -> queue fills -> delays [OK]
Hint: No consumer means queue backs up [OK]
Common Mistakes:
  • Assuming queue empties without consumer
  • Thinking upload service rejects uploads immediately
  • Believing metadata DB processes videos automatically
4. In a video processing pipeline, a developer notices that some videos fail to process and the system does not retry them. Which change will fix this issue?
medium
A. Implement a retry mechanism in the processing service for failed jobs
B. Remove the queue to speed up processing
C. Store videos only after processing completes
D. Disable metadata updates to avoid conflicts

Solution

  1. Step 1: Identify cause of failure handling

    Failures without retries mean the system lacks a retry mechanism for failed processing jobs.
  2. Step 2: Choose fix to handle failures

    Adding retries ensures failed jobs are re-attempted, improving reliability.
  3. Final Answer:

    Implement a retry mechanism in the processing service for failed jobs -> Option A
  4. Quick Check:

    Retries fix failed processing [OK]
Hint: Retries fix failed processing jobs [OK]
Common Mistakes:
  • Removing queue breaks asynchronous design
  • Storing before processing causes errors
  • Disabling metadata updates unrelated to retries
5. You need to design a scalable video upload and processing pipeline that supports millions of daily uploads with minimal user wait time. Which architectural choice best supports this goal?
hard
A. Use asynchronous upload service with message queues and distributed processing workers
B. Process videos synchronously during upload to ensure immediate availability
C. Store all videos on a single server to simplify management
D. Update metadata only after manual verification to ensure accuracy

Solution

  1. Step 1: Analyze scalability and user wait time needs

    Millions of uploads require asynchronous handling and distributed processing to avoid bottlenecks and reduce wait time.
  2. Step 2: Evaluate architectural options

    Asynchronous upload with queues and distributed workers allows parallel processing and smooth scaling.
  3. Final Answer:

    Use asynchronous upload service with message queues and distributed processing workers -> Option A
  4. Quick Check:

    Asynchronous + distributed = scalable and fast [OK]
Hint: Async + queues + distributed workers scale best [OK]
Common Mistakes:
  • Synchronous processing causes delays
  • Single server storage limits scalability
  • Manual metadata delays pipeline