Hi! I am currently designing multiplayer server system for our new game. I have some experience in building client-server systems but only for small amount of players. The game will be mobile game with multiplayer where players are playing against eachothers 1vs1 in real time. Direct connect from device to device is not possible because we want that players are able to play with random people around the world (for example clash of clans and hearthstone). The system should be scaleable so if player base grows up, we can simply launch more server nodes to handle them. I would appriacte if you guys could check this out and let me know if this can work. System will be run on AMS cloud computing servers.
Here are my plans so far:
Login server:
-Clients connect to this node when they launch the game
-Handles account login and redirect player to one of front-ends (balances the load between multiple front-ends)
Front-ends:
-Handles all network traffic between clients
-There can be multiple front-end nodes to balance network load
Lobby server:
-When player want to start multiplayer game they are placed to queue
-When another player with same matchmaking is found lobby server redirects the players to one of game server
Message server:
-Handles in-game messages from player to player
-If the players are connected to different front-ends this server will deliver the message to the right one
Global event server:
-There will be global cooldowns in game that should be updated even when player is offline
-Handle cooldown timers and for example notify players when cooldown or upgrade is finished
Database:
-Database cluster where all information is stored
Game servers:
-There are multiple game servers all connected to the front-ends
-One game server runs a networking thread and 1 to n game threads (thread count depends how many CPU cores are available)
-One game thread can handle couple of game sessions
So do you guys have some tips to make this better or are there any great bottle necks that should be fixed? Thanks!