Lesson Overview + Section #01 + RESHADED Checklist + Quiz #1 are unlocked free below (no login required). Unlock all 80 HD video lessons and deep-dive sections — or watch our two free sample video lessons first.
Designing Instagram requires pairing a petabyte-scale, zero-loss media ingestion and delivery pipeline (1.23 PB/day raw uploads, 449 PB/year, and 5.7 Tbps peak-amplified egress) with a sub-200 ms personalized feed serving 500,000,000 daily active users (579,000 RPS average, 1,158,000 RPS peak). Every architectural decision stems from two asymmetries: binary media files are orders of magnitude larger than metadata rows, and posts are viewed roughly 50 times more often than they are uploaded. L4–L6 interviewers test microservice workload isolation (Upload vs. Social vs. Feed), polyglot database partitioning (SQL vs. Cassandra sharded by user_id), edge CDN offload, and hybrid push/pull feed materialization.
Isolate slow, bandwidth-heavy binary uploads into object storage (S3) and multi-tier CDNs away from latency-critical metadata, social-graph, and feed microservices.
Select storage engines per access pattern—relational SQL for users/follows and wide-column Cassandra sharded by user_id for posts/likes—backed by leader-follower replication.
Scale feed reads across 500M DAU using a 2 TB ID-only Redis Feed Cache populated by asynchronous hybrid push/pull fan-out workers.
Follow this exact sequence from the Intro narration on every system design prompt so you never miss requirements, math, contracts, or the 13-minute deep dive.
0 / 8 Checked
RRequirements & ScopeMin 2–8
Clarify who the users are, 3–4 core functional flows, explicit non-goals, and target latency/availability SLAs before drawing a single box.
Avoid trap: Still gathering requirements at minute 15 squeezes the deep dive where L5/L6 offers are decided.
EBack-of-the-Envelope MathMin 8–12
Compute ONLY numbers that actively change architectural choices: DAU → peak read/write RPS, daily & 5-year storage, bandwidth (or tokens/sec & KV-cache VRAM for AI).
Avoid trap: Spending 10 minutes multiplying irrelevant byte counts that never influence sharding or caching.
SStorage & Data ModelMin 12–15
Define core tables, primary/partition keys, and access indexes. Separate small structured metadata rows (~1 KB) from bulk binary blobs (S3 + CDN).
Avoid trap: Picking Cassandra or NoSQL by buzzword when 40 writes/s & 3 TB fit cleanly on one indexed SQL primary + replicas.
AAPIs & Wire ContractsMin 15–17
Write 3–4 concrete REST/gRPC/SSE/WebSocket endpoints with request/response shapes, cursor pagination, and Idempotency-Key headers on mutations.
Avoid trap: Hand-waving client-server contracts and discovering missing parameters halfway through the deep dive.
HHigh-Level DesignMin 17–27
Draw the simplest end-to-end working read and write paths first. Every box on the board must trace back to a stated requirement or number.
Avoid trap: Reciting a memorized 12-microservice Kafka mesh before proving why a simpler synchronous path breaks.
DDetailed Design (Deep Dive)Min 27–36
Proactively audit your high-level diagram, name the top 2 bottlenecks (hot partitions, fan-out skew, lock contention, GPU saturation), and go deep on internals.
Avoid trap: Waiting passively for the interviewer to rescue pacing or skimming every box at shallow surface depth.
EEvaluation & Failure ModesMin 36–41
State what each architectural choice COSTS you, and trace graceful degradation when cache, queue, external vendor, or primary DB fails.
Avoid trap: Assuming happy-path uptime or placing slow 3-second external calls inline on revenue-critical write paths.
DDistinctive FeatureMin 41–45
Solve the signature hard problem unique to this prompt (e.g., double-entry ledger idempotency, Geohash dispatch locks, OT/CRDT sync, or SSE token streaming).
Avoid trap: Spending 20 minutes on generic login/CRUD tables and zero time on the core distributed challenge.
INTERVIEWER SCORECARD · WHAT MAKES A STRONG HIRE?
5 Signals Bar Raisers Grade (L4 vs. L5 Senior vs. L6 Staff)
Senior (L5 / E5 / Senior SDE) Bar — Autonomous Pacing, Depth & Proactive Trade-Offs: Owns the 45-minute clock without prompting, derives every component quantitatively, surfaces failure modes (hot shards, stampedes, dual writes) BEFORE being asked, and defends consistency vs. latency trade-offs.
1. Scoping
✓ STRONG HIRE SIGNAL
Clarifies users, read/write skew, p99 latency, consistency bounds, and explicit non-goals in minutes 2–8.
✗ NO-HIRE RED FLAG
Jumps straight into drawing load balancers and microservices at minute 2 without asking a single question.
2. Right-Sized Design
✓ STRONG HIRE SIGNAL
Starts with the simplest working architecture justified by the math (e.g., 1 NVMe SQL primary + replicas + Redis for 40 writes/s & 3 TB).
✗ NO-HIRE RED FLAG
Recites a memorized Kafka + multi-DC Cassandra diagram that contradicts their own traffic calculations.
3. Technical Depth
✓ STRONG HIRE SIGNAL
Drives deep into 1–2 hard bottlenecks (partition keys, hot-key mitigation, transactional outbox, KV-cache batching) at minute 27.
✗ NO-HIRE RED FLAG
Skims across 12 boxes at identical buzzword depth and runs out of time before the deep dive.
4. Explicit Trade-Offs
✓ STRONG HIRE SIGNAL
Uses 3-part reasoning: 'A queue here because SMTP spikes to 3 s; checkout stays <60 ms, and we accept eventual email delay + retry dedup.'
✗ NO-HIRE RED FLAG
Name-drops tools ('We put Kafka and ZooKeeper here') without stating the alternative or operational cost.
5. Communication
✓ STRONG HIRE SIGNAL
Thinks aloud every 30–45s, checks alignment at phase transitions, and treats 'What if X fails?' as a cue for where points are awarded.
✗ NO-HIRE RED FLAG
Goes silent for 5 minutes while drawing or defends a flawed assumption defensively when nudged.
ARCHITECTURE & DATA-FLOW SLIDES · SLIDE 1 OF 1Section 01: System Design: Instagram
ARCHITECTURE / DATA FLOW DIAGRAM
SECTION 01 OF 4
1. System Design: Instagram
★ FREE PREVIEW
Key Takeaway: Instagram unites a petabyte-scale immutable object store with a read-heavy social graph, requiring strict physical separation between binary media delivery and low-latency feed metadata.
ARCHITECTURE / DATA FLOW DIAGRAM
Media Sharing Meets the Social Graph
At single-user scale, Instagram's loop is straightforward: a creator captures a photo or short video, uploads it with a caption, and shares it with followers who scroll their personalized news feeds, tap like, and post comments. Multiplied across 1,000,000,000 registered accounts and 500,000,000 DAU uploading 95,000,000 photos and videos daily, the engineering challenge shifts from storing individual files to sustaining massive read fan-out. Every uploaded asset is fetched dozens to millions of times across heterogeneous mobile screens and network speeds.
Binary vs. Metadata Split: Multi-megabyte photos and videos are immutable blobs, whereas captions, timestamps, follows, and likes are tiny structured records (< 200 B).
Extreme Read Dominance: Views, feed scrolls, and profile loads outnumber media uploads by 50:1+, making read caching and edge delivery the primary cost and latency drivers.
Why Binary Payloads Reshape Social Architecture
Compared with text-first microblogging, Instagram's write path ingests 1.23 PB/day of dense visual media, and its read path streams multi-terabit visual feeds. Routing binary uploads and downloads through the same application servers and databases that serve social-graph queries would saturate server NICs, exhaust thread pools on slow cellular uploads, and bloat database page caches.
Workload Dimension
Write Path Reality
Read Path Reality
Architectural Consequence
Payload Size
3 MB average photo; 30 MB short video
Multi-resolution thumbnails & adaptive video streams
Store files in Blob Store (S3); databases store only media_url pointers
Traffic Amplification
95M media uploads/day (~1,100 uploads/sec)
~50+ views per upload; 579,000 API RPS avg
Precompute feed post IDs in RAM and serve 95%+ of bytes from edge CDN PoPs
Connection Duration
Seconds-long cellular binary uploads
Sub-200 ms JSON metadata fetches
Isolate Upload Service fleet so slow uploads never starve Feed Service threads
SECTION 02 OF 4
2. Requirements of Instagram's Design
🔒 PRO SECTION
Key Takeaway: Deliver sub-200 ms feed latency, 99.999999999% media durability across 449 PB/year of uploads, and 5.7 Tbps of read throughput by trading global read-after-write linearizability for eventual consistency.
Section 1 + Checkpoint Quiz #1 are unlocked free outside the paywall. Unlock all architecture slides, QPS & sharding trade-off tables, and all 80 narrated HD video lessons with Full Access — or inspect our sample payment system lesson first.
Key Takeaway: Split traffic across dedicated Upload, Social, and Feed microservices backed by relational SQL for account invariants, wide-column Cassandra for high-velocity posts/likes, and S3 + CDN for media.
Section 1 + Checkpoint Quiz #1 are unlocked free outside the paywall. Unlock all architecture slides, QPS & sharding trade-off tables, and all 80 narrated HD video lessons with Full Access — or inspect our sample payment system lesson first.
Key Takeaway: Combine hybrid push/pull fan-out workers with a 2 TB ID-only Redis Feed Cache and user_id-sharded replicated post databases to keep both home feeds and profile grids single-lookup fast.
Section 1 + Checkpoint Quiz #1 are unlocked free outside the paywall. Unlock all architecture slides, QPS & sharding trade-off tables, and all 80 narrated HD video lessons with Full Access — or inspect our sample payment system lesson first.
In "System Design: Instagram" (Why Binary Payloads Reshape Social Architecture), how does a production-grade design handle "Traffic Amplification" (Architectural Consequence)?