The Real Fullstack

Design a File Upload Service

Your API servers spend 80 % of their time streaming bytes they never look at. How should uploads flow?

Ingeniero12 minConstructor de arquitectura
s3cdnsqsvirus-scanning

Este reto aún no está traducido al Español. Estás leyendo la versión en inglés.

Misión:Build an architecture where clients upload directly to object storage with short-lived permission, processing happens asynchronously, and downloads are cached — within the budget.Contexto · Objetivos de aprendizaje ▾

Hollow Basket lets sellers upload product photos and videos up to 2 GB. Today the API receives every upload, scans it synchronously and writes it to storage. Uploads time out, API pods run out of memory, and downloads come from a public bucket.

Misión: Build an architecture where clients upload directly to object storage with short-lived permission, processing happens asynchronously, and downloads are cached — within the budget.

Objetivos de aprendizaje

  • Use presigned URLs so the API authorises but does not proxy bytes.
  • Process uploads asynchronously from storage events.
  • Serve downloads through a CDN, never from a public bucket.
SimulaciónSimulado
seller app → upload APIseller app → private object storageupload API → private object storageupload API → metadata DBprivate object storage → event queueevent queue → malware scannermalware scanner → thumbnail workerthumbnail worker → private object storagemalware scanner → metadata DBseller app → CDNCDN → private object storageupload API → malware scannerseller app → public bucketseller appupload APImetadata DBCDNprivate object storageevent queuemalware scannerthumbnail workerpublic bucket

Selecciona componentes y conexiones. Teclado: usa las listas bajo el diagrama.

Ejecutar simulación

Ejecuta la simulación para ver la salida.

Simplificación

Costs are abstract units. Real designs also add size limits, content-type checks and lifecycle rules. Modelo educativo: los números ilustran un comportamiento, no son benchmarks.

Conceptos

Retos relacionados

Referencias