Loading system design...
Design the news feed for a media-rich social platform like Instagram. Users see a personalised, algorithmically ranked feed of photos and videos from accounts they follow, along with Stories (24-hour ephemeral content) and an Explore page for content discovery. Unlike Twitter's text-first feed, Instagram's feed is centred on heavy media (high-res images, short-form video/Reels) which makes the media processing and delivery pipeline a critical design dimension.
| Metric | Value |
|---|---|
| Daily active users (DAU) | 500 million |
| Monthly active users (MAU) | 2 billion |
| Posts uploaded per day | 100 million (photos + videos + Reels) |
| Stories posted per day | 500 million |
| Feed reads per day | 50 billion (~580,000 per second) |
| Average post media size | 2 MB (image); 15 MB (video); 50 MB (Reel) |
| New media stored per day | 100M × 2MB ≈ 200 TB (images) + video |
| Feed cache per user | 500 postIds × 8 bytes ≈ 4 KB |
| Total feed cache (Redis) | 500M × 4KB ≈ 2 TB (× 3 replicas ≈ 6 TB) |
Users can upload photos and short videos (Reels up to 90 seconds) with captions, hashtags, and location tags
Users can follow/unfollow other users and view a personalised news feed of posts from followed accounts
News feed is ranked by a relevance algorithm (engagement prediction, recency, affinity) not purely chronological
Feed loads in < 300ms and supports infinite scroll with cursor-based pagination
Users can like, comment, save (bookmark), and share posts; engagement counts update in near real-time
Stories: ephemeral photo/video posts that disappear after 24 hours; shown in a separate carousel above the feed
Explore/Discovery page: surface trending and recommended content from accounts the user does NOT follow
Push notifications for likes, comments, follows, and mentions
Support image/video processing: resize to multiple resolutions, generate thumbnails, transcode videos to adaptive bitrate formats
Content moderation: detect and flag NSFW, violent, or policy-violating content before it appears in feeds
Non-functional requirements define the system qualities critical to your users. Frame them as 'The system should be able to...' statements. These will guide your deep dives later.
Think about CAP theorem trade-offs, scalability limits, latency targets, durability guarantees, security requirements, fault tolerance, and compliance needs.
Frame NFRs for this specific system. 'Low latency search under 100ms' is far more valuable than just 'low latency'.
Add concrete numbers: 'P99 response time < 500ms', '99.9% availability', '10M DAU'. This drives architectural decisions.
Choose the 3-5 most critical NFRs. Every system should be 'scalable', but what makes THIS system's scaling uniquely challenging?