The Blockheads is a 2d minecraft style game. The server supports a maximum of 16 players. When players want to play online we let them join a random server, or create their own. All servers are persistent and are playable at any time
I was contracted to build the server infrastructure and a REST API for interfacing with it. The API was developed with Python and uses the Django web framework.
As the number of concurrent players increases, the system dynamically builds and deploys new machines. Each machine runs around 40-60 servers, all determined by metrics managing the system load.
When all players leave a server, the server is shutdown and archived onto S3 until it is required again at which point it is restored.