The original stack (2010)

Instagram launched with three engineers and a setup the author calls "almost embarrassing in how simple it is" (0:33):

  • EC2 — rented Amazon virtual machines for the application servers (0:58).
  • S3 — photo blobs (0:58).
  • One single Postgres database — user accounts, photo metadata, comments, likes and the follow graph, all of it (0:58).
  • No microservices, no Kafka, no fancy infrastructure of any kind (0:58).
flowchart LR
    U[Users] --> EC2[Django app servers on EC2]
    EC2 --> S3[(S3 — photo files)]
    EC2 --> PG[(Single Postgres — accounts, metadata,<br/>comments, likes, follow graph)]

The growth timeline

YearScaleInfra state
2010Launch, 3 engineersSingle Postgres (0:33)
201110 million usersInfra still simple (0:58)
201227 million users, 2 TB Postgres, Facebook acquisition for $1BStill only a few engineers (0:58)

Where it cracked

By 2012 the single-database setup is starting to break (1:33):

  • 2 TB was approaching the memory limit of the biggest EC2 instance rentable at the time.
  • Disk I/O was saturated.
  • They had vertically scaled to the absolute maximum — nowhere left to go on a single machine (1:33).

Notably, the first wall they hit had nothing to do with data size, disk space, or photo upload volume — it was connections (1:59, 2:23). See 03-bottleneck-connections-and-pgbouncer.md.