Reqflow
← All comparisons

Real-time Gaming Leaderboard vs URL Shortener

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
URL Shortener

URL Shortener

Hashing, key generation, read-heavy caching.

Components (6)

  • Client
  • API Gateway
  • Write Service
  • Read Service
  • Redis
  • Postgres

Headline numbers

  • Write QPS (avg)~1,200/sec
  • Read QPS (avg)~120,000/sec
  • Storage per year~5 TB

Key differences

Only in Real-time Gaming Leaderboard
None.
In both
  • Client
  • Service
  • Cache
  • Database
Only in URL Shortener
  • API Gateway

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
URL Shortener flows
  • Shorten a URL3 steps
  • Resolve short URL (cache hit)3 steps
  • Resolve short URL (cache miss)4 steps
  • Redis is down4 steps