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?

エンジニア12 分アーキテクチャビルダー
s3cdnsqsvirus-scanning

この課題はまだ日本語に翻訳されていません。英語版を表示しています。

ミッション:Build an architecture where clients upload directly to object storage with short-lived permission, processing happens asynchronously, and downloads are cached — within the budget.背景 · 学習目標 ▾

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.

ミッション: Build an architecture where clients upload directly to object storage with short-lived permission, processing happens asynchronously, and downloads are cached — within the budget.

学習目標

  • 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.
シミュレーションシミュレーション値
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

コンポーネントと接続を選択します。キーボードでは図の下のリストを使ってください。

シミュレーションを実行

シミュレーションを実行すると出力が表示されます。

簡略化

Costs are abstract units. Real designs also add size limits, content-type checks and lifecycle rules. 教育用モデルです。数値は挙動を示すためのもので、ベンチマークではありません。

コンセプト

関連する課題

参考資料