Pick the fix
Users upload 2 GB videos through the API servers, which buffer each file, run short of memory and time out. Best fix?
Hint 1 of 1
Do the file bytes need to pass through your servers at all?
Choose an answer, then open Show answer below to check it.
Text version
Boxes on the board, in order:
- Client
- Upload API
- Postgres
- Object storage
- Scan queue
- Worker
Show answer
Answer: A Return pre-signed multipart URLs so clients upload straight to object storage
Correct. The bytes skip your servers, and a failed part is retried on its own.
Large uploads shouldn't flow through the app tier. A pre-signed URL lets the client send bytes straight to object storage under a narrow, expiring permission, and multipart means only failed parts are resent.
Why not the others?
- B Raise the request timeout to 30 minutes. Servers still hold the bytes, and one dropped connection restarts the whole upload.
- C Add more API servers. Spreads the memory problem without removing it, at a higher cost.
- D Compress the files on the client first. Video is already compressed, and the bytes still pass through the API.