Scaling Glance Game Centre to Support 100 Million Daily Active Users
Article Summary
Glance Game Centre serves millions of daily users playing HTML5 games on their lock screens. Their leaderboard system hit a wall with a single-node MongoDB struggling under 1000 QPS.
The Glance engineering team needed to scale their tournament leaderboard infrastructure 100x to support concurrent tournaments across hundreds of games. They documented their migration from self-hosted MongoDB to Azure Cosmos DB with zero downtime.
Key Takeaways
- Migrated 10M+ documents while serving 500 QPS with zero downtime
- Chose Cosmos DB over sharded MongoDB for managed scaling and Azure familiarity
- Built synthetic partition key (tournamentId_userId) to avoid hot partitioning
- Used dual-write strategy and custom migration endpoint to sync databases
- Switched reads after full migration, then deprecated old MongoDB
Glance scaled their gaming leaderboard to handle 100M daily active users by migrating to Cosmos DB without a single second of downtime.
About This Article
Glance's leaderboard had 10M+ documents spread across 3 MongoDB collections. With 1000 QPS hitting the system from reads and writes combined, they couldn't run multiple tournaments at the same time without running into limits.
Saket Agarwal's team switched to Azure Cosmos DB's MongoDB API v4. They created a synthetic partition key using tournamentId_userId and set up three optimized indexes, including single-key and compound options. This spread the load evenly across logical partitions.
The move let Glance scale the leaderboard horizontally without any downtime. They can now add more Request Units as they grow beyond their current 100M daily active users.