Skip to content

Design a Video Processing Pipeline, stage 3 of 14: decide

How does the system learn the upload finished?

The parts are in storage, but the video row still says uploading. Something has to move it to queued so processing can start.

The browser is the first to know the parts are uploaded, but it is also the least reliable participant: tabs close, laptops sleep, and clients can be buggy or malicious.

System so far· 4 parts
12CLIENTInstructorbrowserSERVICEVideo APIDATABASEPostgresOBJECT STOREObject storage

Select a component to see what it is responsible for and which state it owns.

  1. 1Instructor browser → Video API: Create upload, report parts, poll status
  2. 2Instructor browser → Object storage: Upload parts via presigned URLs
  • Request / response
  • Bulk data

What you need to know

0 of 2 checks done
  1. Video status is a state machine: a fixed set of states and the allowed moves between them.

    uploading → queued → processing → ready
                                    ↘ failed

    Each move should happen because of a fact the system has checked, not because a participant said so.

  2. Check

    The browser says "all parts uploaded". Why not move the video to queued on that alone?