← All comparisons

Google Docs (Realtime Collab) vs Instagram Feed

Google Docs (Realtime Collab)

Google Docs (Realtime Collab)

Operational Transforms (or CRDTs) merge concurrent edits from many clients into one consistent document.

Components (7)

  • Browser Client
  • WebSocket Gateway
  • Document Service
  • OT Server
  • Presence Service
  • Snapshot Store
  • Op Log

Headline numbers

  • Op QPS~25M/sec aggregate
  • WebSocket connections~100M peak
  • Op log writes / sec~25M/sec
Instagram Feed

Instagram Feed

Fan-out on write vs read, ranking, CDN.

Components (10)

  • Mobile Client
  • CDN
  • API Gateway
  • Feed Service
  • Post Service
  • Kafka
  • Fan-out Worker
  • Redis
  • Postgres
  • S3

Headline numbers

  • Posts / sec (avg)~3,000/sec
  • Feed read QPS~58,000/sec
  • Fan-out writes / sec~600,000/sec

Key differences

Only in Google Docs (Realtime Collab)
None.
In both
  • Client
  • Api Gateway
  • Service
  • Database
  • Queue
Only in Instagram Feed
  • CDN
  • Redis
  • S3

Flow shape

Google Docs (Realtime Collab) flows
  • Open a document4 steps
  • Two users type at the same character position5 steps
  • OT server box crashes mid-edit5 steps
Instagram Feed flows
  • Post a photo (fan-out on write)7 steps
  • Open feed (precomputed timeline)5 steps
  • Fan-out Worker is down7 steps
  • Timeline cache flushed (Redis restart)4 steps