Handling Large Blobs hard
Why is 'Event-Driven Transcoding' preferred over processing uploads synchronously?
- A Transcoding (e.g., AVI to MP4) is CPU intensive and slow. Blocking the upload response would timeout the client. Instead, upload to S3 -> Trigger Lambda -> Queue Job -> Worker processes -> Update DB.
- B It is cheaper.
- C It is simpler.
- D It requires less code.
Answer: A. Transcoding (e.g., AVI to MP4) is CPU intensive and slow. Blocking the upload response would timeout the client. Instead, upload to S3 -> Trigger Lambda -> Queue Job -> Worker processes -> Update DB.
Decoupling allowing scaling the worker pool independently of the web server pool.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- Why do modern sites serve images in WebP or AVIF format?
- What does the acronym BLOB stand for?
- Why do we sometimes convert binary images to Base64 strings?
- What is an 'Origin Shield' or 'Mid-Tier Cache' in a CDN architecture?
- For a feed with 100 images, why use 'Lazy Loading'?
- How does HLS/DASH handle a user moving from WiFi to 4G (Variable Bandwidth)?