← All comparisons

Chat (Slack-style) vs Instagram Feed

Chat (Slack-style rooms)

Chat (Slack-style rooms)

Room-based pub/sub fanout across gateway instances.

Components (6)

  • Sender
  • Recipient
  • WS Gateway
  • Chat Service
  • Postgres
  • Redis Pub/Sub

Headline numbers

  • WebSocket connections~10M concurrent
  • Messages / sec~3K avg, ~15K peak
  • Fan-out writes / sec~30K
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 Chat (Slack-style)
None.
In both
  • Client
  • Api Gateway
  • Service
  • Database
  • Queue
Only in Instagram Feed
  • CDN
  • Redis
  • S3

Flow shape

Chat (Slack-style) flows
  • Send to a room6 steps
  • Reconnect and catch up4 steps
  • Redis Pub/Sub is down5 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