RETURN TO SYSTEM DESIGN VAULT (55)BLUEPRINT #03 // Easy
#03EasyHigh-Concurrency Feeds & Social
Design Instagram
ASKED IN INTERVIEWS AT:MetaMicrosoftTwitterAmazon
EXECUTIVE SUMMARY & PROBLEM STATEMENT
Design an image-sharing platform featuring asynchronous media processing, user follow graphs, and fan-out feed generation for millions of concurrent users.
SCALE ESTIMATION & TRAFFIC ENVELOPE
DAILY ACTIVE USERS / TPS500 Million DAU
READ / WRITE TRAFFIC RATIO20:1 Read-heavy
5-YEAR STORAGE CAPACITY2 Petabytes of compressed imagery per month
FUNCTIONAL REQUIREMENTS
- [1]Upload photos and captions
- [2]Follow/unfollow users
- [3]Render reverse-chronological or ranked home feed
NON-FUNCTIONAL REQUIREMENTS
- •Feed latency < 200ms
- •Zero data loss on uploaded photos
- •Massive fan-out handling for celebrity accounts
CORE ARCHITECTURAL COMPONENTS
Image Transcoding Worker Queue
Object Storage (S3)
Global CDN (Cloudflare/CloudFront)
Redis Feed Cache
Graph Service for Follower Lists
DATA SCHEMA & PERSISTENCE
Users, Followers, Posts (post_id, user_id, media_urls, caption), UserFeeds (user_id, post_id, score)
DISTRIBUTED TRADE-OFFS & FAILURE MODES
- ⟡Push fan-out on write (fast reads, heavy writes) vs Pull on read for celebrity accounts (avoids 100M queue writes).