Learn System Design through Instagram

One real architecture, explained completely. Click any box, arrow label or β—† chip in the diagram to open a lesson on that concept, or play a request flow to watch data move through the system step by step.

41lessons
7learning parts
7animated request flows
250+interview & quiz questions

How to use this guide

Pick the approach that suits you. Your progress is saved in this browser.

1Follow the path

Work through the lessons in order, from Foundations to the full interview walkthrough. Each lesson builds on earlier ones.

2Explore the diagram

Hover over anything to see a summary, and click to open its lesson. Each lesson's πŸ“ Show on diagram button brings you back here.

3Play the flows

Pick a flow such as β€œPost a photo” and step through it with ← β†’. Each step highlights the components involved and links to their lessons.

4Test yourself

Every lesson ends with interview questions, a quiz with hidden answers and key takeaways. Mark the lesson as learned to track progress.

πŸ—ΊοΈ The architecture: Instagram, high level

Everything is clickable. β—† chips are concepts that apply to the area they sit in. The dashed strip at the bottom holds cross-cutting topics.

β–Ά Play a request flow:
Instagram β€” High-Level System Design Click any box, label or β—† chip to open its lesson Clients β€” click to learn Clients β†— Application Services (stateless Β· horizontally scaled) β€” click to learn Application Services (stateless Β· horizontally scaled) β†— Data Layer β€” click to learn Data Layer β†— Async Processing β€” click to learn Async Processing β†— Consumers β€” click to learn Consumers β†— GET media β€” click to learn GET media resolve β€” click to learn resolve push notifications β€” click to learn push notifications domain events: post created Β· story created Β· like / comment Β· follow β€” click to learn domain events: post created Β· story created Β· like / comment Β· follow REST / gRPC Β· WebSocket β€” click to learn REST / gRPC Β· WebSocket media β€” click to learn media metadata β€” click to learn metadata origin pull β€” click to learn origin pull index β€” click to learn index write post IDs to followers' timelines β€” click to learn write post IDs to followers' timelines store processed renditions β€” click to learn store processed renditions CDN β€” click to learn CDN photos Β· videos Β· thumbnails Mobile App β€” click to learn Mobile App iOS / Android Web Client β€” click to learn Web Client Browser Push Providers β€” click to learn Push Providers APNs / FCM DNS β€” click to learn DNS Load Balancer β€” click to learn Load Balancer L4 / L7, multi-region API Gateway β€” click to learn API Gateway AuthN/Z Β· rate limiting Β· routing Β· TLS Upload Service β€” click to learn Upload Service posts / reels pre-signed URLs Stories Service β€” click to learn Stories Service 24h TTL Like & Comment β€” click to learn Like & Comment Service Follow / Graph β€” click to learn Follow / Graph Service News Feed Service β€” click to learn News Feed Service timeline read ML-ranked Search Service β€” click to learn Search Service users Β· tags Β· places Direct Messaging β€” click to learn Direct Messaging WebSocket User / Auth Service β€” click to learn User / Auth Service profiles Β· sessions Object Storage β€” click to learn Object Storage Amazon S3 photos & videos Post / Comment / Story Metadata β€” click to learn Post / Comment / Story Metadata Cassandra sharded by user_id Social Graph β€” click to learn Social Graph follower / following sharded store Feed Cache β€” click to learn Feed Cache Redis timelines Β· counters Search Index β€” click to learn Search Index Elasticsearch Messages Store β€” click to learn Messages Store Cassandra / HBase User DB β€” click to learn User DB PostgreSQL sharded + replicas Kafka β€” Event Bus β€” click to learn Kafka β€” Event Bus topics: posts Β· likes Β· comments Β· follows Β· stories Search Indexer β€” click to learn Search Indexer updates Elasticsearch Feed Fan-out Workers β€” click to learn Feed Fan-out Workers push post IDs to followers' timelines (pull model for celebrities) Media Processing Workers β€” click to learn Media Processing Workers resize Β· transcode Β· thumbnails content moderation Notification Service β€” click to learn Notification Service likes Β· comments Β· follows Β· DMs Analytics & ML Training β€” click to learn Analytics & ML Training Spark / data warehouse feed & Explore ranking models HTTPS Β· TLS Β· HTTP/2 β€” click to learn β—† HTTPS Β· TLS Β· HTTP/2 Rate limiting β€” click to learn β—† Rate limiting AuthN / AuthZ β€” click to learn β—† AuthN / AuthZ API design β€” click to learn β—† API design Resilience: timeouts Β· retries Β· circuit breakers β€” click to learn β—† Resilience: timeouts Β· retries Β· circuit breakers Service discovery β€” click to learn β—† Service discovery Indexing β€” click to learn β—† Indexing Replication β€” click to learn β—† Replication Sharding β€” click to learn β—† Sharding Consistent hashing β€” click to learn β—† Consistent hashing Snowflake IDs β€” click to learn β—† Snowflake IDs SQL vs NoSQL β€” click to learn β—† SQL vs NoSQL Cross-cutting concepts β€” apply to every box above How to approach β€” click to learn β—† How to approach Requirements β€” click to learn β—† Requirements Capacity estimation β€” click to learn β—† Capacity estimation Scalability & availability β€” click to learn β—† Scalability & availability CAP & consistency β€” click to learn β—† CAP & consistency Resilience β€” click to learn β—† Resilience Multi-region & DR β€” click to learn β—† Multi-region & DR Observability β€” click to learn β—† Observability Security & privacy β€” click to learn β—† Security & privacy End-to-end flows β€” click to learn β—† End-to-end flows Interview walkthrough β€” click to learn β—† Interview walkthrough Legend: Client Edge / Networking Service Async / Streaming Storage External Synchronous request Event / async flow Media delivery / push / DNS

πŸ“š Learning path

41 lessons in 7 parts. Each one follows the same structure: TL;DR β†’ the problem β†’ how it works β†’ how Instagram uses it β†’ trade-offs β†’ technologies β†’ interview corner β†’ quiz β†’ key takeaways.

🧭 Suggested study plans

⚑ Interview in 3 days

How to Approach β†’ Requirements β†’ Capacity Estimation β†’ News Feed β†’ Caching β†’ Sharding β†’ Message Queues β†’ CDN β†’ Interview Walkthrough β†’ play every flow.

πŸ“… Two-week deep dive

Two or three lessons a day in order. Answer every quiz before opening the answer, then redraw the diagram from memory at the end of each part.

🎯 Concept refresher

Use the sidebar filter or the Glossary to jump to a single topic, then read its Key Takeaways and Interview Corner.