Phase 1: Clarify, Scope & Constraints
Interviewer: "Let's design Instagram — a photo and video sharing platform. How do you approach this?"
Candidate: "Great. Let me clarify the user journeys I'll focus on:
- Upload journey — User takes a photo/video, uploads it, it appears on their profile and their followers' feeds
- Feed journey — User opens the app and sees a ranked feed of recent posts from people they follow
- Discovery journey — User browses Explore to find content from accounts they don't follow
- Interaction journey — User likes, comments on, or saves a post
The dominant complexity is the feed delivery problem. Instagram has ~1B DAU, and when any one of them posts a photo, that photo potentially needs to appear in the feeds of all their followers — simultaneously. With some accounts having tens of millions of followers, naive fan-out approaches collapse under write amplification.
WHY: The second complexity is the ranking problem — a chronological feed doesn't work at scale (you'd miss things from accounts you care about). A ranked feed requires running ML inference on every candidate post, which is expensive. We need to precompute enough that ranking at read time is fast.
Non-goals for V1:
- Instagram Stories (24-hour ephemeral content — different retention/serving pattern)
- Reels (video-first, requires transcoding pipeline like YouTube)
- Direct Messages (separate messaging system)
- Shopping / monetization features
- Creator analytics
Interviewer: "What about Stories? That seems core to Instagram today."
Candidate: "You're right that Stories are central to Instagram's current product. But architecturally they're a distinct system —…
In the full tutorial
- Phase 2: High-Level Architecture
- Phase 3: Deep Dive & Evolution
- Phase 4: Robustness & Operations