One Million Chessboards: A Single-Process Server Handling Millions of Concurrent Chess Games

2025-07-16
One Million Chessboards: A Single-Process Server Handling Millions of Concurrent Chess Games

The author built "One Million Chessboards," an online multiplayer chess game where a 1000x1000 grid of chessboards forms a single global game. Every move instantly affects the entire board, with no turns and inter-board movement allowed. Running on a single Go process, the game attracted over 150,000 players in 10 days, processing over 15,000,000 moves and hundreds of millions of queries. The article details the game's system design, data distribution, protocol optimizations, optimistic locking, and rollback mechanisms. The author shares lessons learned, including performance optimization, architectural choices, and balancing game scale with player experience. The post concludes with reflections on design flaws, such as the lack of an awe-inspiring scale, and future game development plans.