Image/Video Hosting: Problem Definition and Scale
What you'll learn: How to define the core requirements and estimate the massive scale needed to host billions of images and videos worldwide.
The Core Challenge
Image and video hosting platforms like Instagram, YouTube, or Imgur face a fundamentally different challenge than text-based systems. While a URL shortener stores tiny strings and Pastebin handles kilobytes of text, media hosting must handle gigabytes of data per second across uploads, storage, and delivery. You're building a system where a single 4K video can be 2GB, and millions of users expect instant uploads and smooth streaming.
Defining the Requirements
Functional Requirements
- Upload: Accept images (JPEG, PNG) and videos (MP4, MOV) from users
- Storage: Persist original media and multiple processed versions (thumbnails, resolutions)
- Retrieval: Serve media quickly via direct links or embedded players
- Processing: Generate thumbnails, transcode videos to multiple formats/bitrates
Non-Functional Requirements
- Scale: Support billions of files and petabytes of storage
- Availability: 99.9%+ uptime for viewing (uploads can tolerate brief delays)
- Latency: Sub-second retrieval for images, low-latency streaming for videos
- Bandwidth: Handle massive read traffic (far exceeds write traffic)
Understanding the Scale
Think of scale estimation as your blueprint. If 100M daily users upload an average of 5 images (2MB each) and 1 video (50MB), you need:
- Write bandwidth: ~60TB/day
- Storage growth: ~60TB/day (plus processed versions → 3-5x multiplier)
- Read bandwidth: 10-100x write bandwidth due to viral content
Key Takeaway: Image/video hosting is a storage-intensive, read-heavy problem requiring careful planning for upload pipelines, multi-tier storage, transcoding infrastructure, and global content delivery—orders of magnitude more complex than text-based systems.