Loading page…
One strong interview answer to a live game leaderboard: 5 GB that fits one node, why rank is a count that SQL can't afford and a skip-list sorted set can, packing time into scores for ties, match_id dedupe in a Lua script, sharding by player hash, exact ranks at the top and a histogram for the tail, and rebuilding derived data from Kafka and PostgreSQL.
You finish a match, and the game tells you, instantly, that you've climbed to rank 48,213 of 50 million.