Instagram Architecture

How Instagram stores photos and builds the news feed: upload service, object storage behind a CDN, feed generation, the follower graph and caching.

Instagram Architecture — System design

How it flows

  1. Mobile Clients → Load Balancer (HTTPS)
  2. Load Balancer → API Servers (REST)
  3. API Servers → Cache (Read/Write)
  4. API Servers → Photo Upload Service (REST)
  5. API Servers → News Feed Service (REST)
  6. API Servers → Notification Service (Event)
  7. Photo Upload Service → Object Storage (S3 PUT)
  8. Object Storage → CDN (Origin Pull)
  9. CDN → Mobile Clients (HTTPS (media))
  10. News Feed Service → Followers Graph (Graph Query)
  11. News Feed Service → Cache (Feed Cache)
  12. Photo Upload Service → Notification Service (Kafka)

Components

Mobile Clients · Load Balancer · API Servers · Photo Upload Service · News Feed Service · Notification Service · Object Storage · CDN · Followers Graph · Cache

← All designs

Try AI Flowchart free →