Live Leaderboard: The World Final
Hard · system design problem
The world final starts: four times the spectators on live connections, twice the score updates, and the final’s leaderboard becomes the hottest partition in DynamoDB.
Players submit scores through game-api into the scores table; every fourth score changes a rank, which game-api writes to the board table. Spectators keep a WebSocket open to the live-board gateway, which serves rank reads through board-svc from the board table (30,000 RCU, 4,000 WCU, ~3,000 RCU per partition). Each gateway instance holds at most 200,000 connections. At T+20s the final starts: spectators ×4 and players ×2 for the rest of the hour, and half of the board table’s traffic is the final’s leaderboard — one partition key. Ranks are the same for every spectator.
Topics
More
Codelays runs in your browser: turn on JavaScript to use it.