Reqflow
← All comparisons

Real-time Gaming Leaderboard vs Instagram Feed

Real-time Gaming Leaderboard

Real-time Gaming Leaderboard

Redis sorted sets for O(log n) score updates and rank queries; MySQL holds durable points and profiles. Top-N, a player's own rank, and the players around them.

Components (5)

  • Player
  • Game Service
  • Leaderboard Service
  • Redis Sorted Set
  • MySQL

Headline numbers

  • Score-update QPS (avg)~580/sec
  • Peak update QPS~2,500/sec
  • Sorted-set memory~650 MB
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 Real-time Gaming Leaderboard
None.
In both
  • Client
  • Service
  • Cache
  • Database
Only in Instagram Feed
  • CDN
  • API Gateway
  • Kafka
  • S3

Flow shape

Real-time Gaming Leaderboard flows
  • Player scores a point4 steps
  • Fetch the top 103 steps
  • Fetch a player's own rank2 steps
  • Fetch players around me (±4)3 steps
  • Redis node is lost3 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