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
Critical Insight
Glance scaled their gaming leaderboard to handle 100M daily active users by migrating to Cosmos DB without a single second of downtime.