RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #43 // Hard
#43HardMedia Streaming & Storage
Design a File Downloader Library from Frontend to Backend
ASKED IN INTERVIEWS AT:Meta
EXECUTIVE SUMMARY & PROBLEM STATEMENT
Design an enterprise-grade client-server file downloader SDK supporting concurrent byte-range downloads, pause/resume, integrity checksums, and adaptive chunk sizing.
SCALE ESTIMATION & TRAFFIC ENVELOPE
DAILY ACTIVE USERS / TPS100 Million daily downloads across web and desktop apps
READ / WRITE TRAFFIC RATIOHigh volume data streaming
5-YEAR STORAGE CAPACITYIndexedDB / FileSystem Access API client buffers
FUNCTIONAL REQUIREMENTS
- [1]Download multi-gigabyte files reliably over flaky networks
- [2]Pause and resume downloads seamlessly
- [3]Merge byte chunks into a unified local file
NON-FUNCTIONAL REQUIREMENTS
- •Maximize client network bandwidth via parallel connections
- •Memory efficient: stream directly into storage without high RAM usage
- •Resilient to connection drops
CORE ARCHITECTURAL COMPONENTS
Client Download Manager SDK
Web Worker Thread Pool
File System Access API Adapter
Range Request CDN Edge
Integrity Validator
DATA SCHEMA & PERSISTENCE
DownloadTask: id, url, total_bytes, chunks: [{ start_byte, end_byte, status, retries }]
DISTRIBUTED TRADE-OFFS & FAILURE MODES
- ⟡Using HTTP Range headers to fetch 4 parallel chunks concurrently speeds up download times by 300% on high-bandwidth connections.