All challenges
Multiple ChoiceBeginner 45s

Sharded counters for real-time leaderboard

A single hot counter key bottlenecks a global leaderboard. Which scale-out technique helps most?
Options
  1. 1Increase the single hot key's TTL so the counter expires and resets more often
  2. 2Move the hot counter into a single relational table row guarded by a row lock
  3. 3Shard the counter across keys and sum on read, or use a sorted set with periodic aggregation
  4. 4Reduce the leaderboard update frequency only without changing the counter layout

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle