Poorly developed game server is a nightmare. Case studies and checklist.

Nbase
3 min readJun 7, 2023

--

A reliable, fast game server is the most crucial part of any game, I believe.

Especially, if you are serious about games, you would not accept a slow loading, lag, or disconnection.

As a former project manager from several game development companies, I have seen various types of errors and crash on the game server leading to a huge loss or serious consequences. Here is a list of some cases, which we all should not see happening on any game server.

1. Overloaded CPU due to incorrect server logic — The RPG game had the data related to quests saved on memories, and the logic was constructed to determine the status of each quest every time a user made a progress on it. To simply put, X number of users doing Y times of actions during quests caused a total of X*Y*(number of quests), giving a ridiculous amount of calculation and level of stress on the server’s CPU.

→ The server was not usable. It had to be re-designed and re-developed from the scratch.

2. Overloaded MSSQL Replication — This game’s main DB had a system error due to the RDB being overloaded.

→ Loads on RDB were distributed to Redis and MongoDB to prevent a further overload.

3. Server shut down due to in-house Queue pool — The company developed its own Queue system, but it did not go through a strict QA, causing some issues on the server occasionally.

→ Implemented Kafka to replace the faulty in-house Queue pool

4. Server shut down due to the overloaded CPU of the API web server — Special events and login rewards led to a sharp increase of in-game requests from players, overloading the CPU that handled such amount of requests simultaneously.

→ Made the API server distribute to others and implemented the Queue system for sequential handling of request.

5. Server shut down due to the lack of reconnection option — This game server did not have the reconnection option set up properly, so the server was immediately shut down when there was 1~3 seconds of disconnection due to rebooted MongoDB, Redis, and MSSQL.

→ Set up the reconnection option to resolve the issue.

Check-list for a reliable, efficient game server

  1. Reliability — The foundation of the server must be carefully designed and developed. There should not be any memory leak, or any minor issue should not cause after-effects on the game’s server.
  2. Network — Prepare for global service from the beginning, as Socket server’s response is not fast enough for global service.
  3. Database — Utilize Redis transaction lock, or lower the usage limit of NoSQL from 100% to 30% while distributing the remaining to the scalable NoSQL and Redis.
  4. Security — Encrypt and compress protocols to improve network speed and enhance security.
  5. Log — Should be retrievable real-time; may utilize a collector program, such as Fluentd, to collect, send, and save logs.
  6. Services other than RDB must be clustered.

Quick view of a proper game server

Given the complexity and structural system requirements, game development can really take years to finish. However, with the software development kit (SDK) from Nbase, developers and engineers can tremendously shorten and simplify the development cycle of their games. The Nbase Game SDK allows them to implement the pre-built game functionalities easily and quickly into their games.

Nbase aims to help companies with development and operation of game functionalities so that they can invest and focus more on other infrastructure, marketing, and quality of the game.

❗️To learn more about Nbase SDKs, visit our website.

--

--