Differences between gaming server and general server
Created#More Posted time:Dec 16, 2016 11:32 AM
Games are everywhere in our daily life. Online games have in some sense become an important way for us to handle the pressure and relax in the internet age. Many internet companies are making innovations in gaming, and “unicorns” of this age keep emerging in the online games industry. However, speaking of stories behind games, we should first talk about gaming servers. Gaming servers have to not only support so many online users at the same time, but also provide a sound user experience. How do they achieve this? Compared with general servers, what is different about gaming servers?
First, compared with general servers, gaming servers need to save the status information of more users, including user levels and other attributes which are needless to mention, general IM services, and some constantly changing data, such as the health points of a player, and the mana points before and after a player activates an ability. These values, different from general attributes such as a name and an ID, change frequently and even participate in the logic computation, for example, how much will the combat power point of a player at a certain level change after he eats some item, whether a player with a certain attribute may be able to dodge the attack, and whether a critical strike will be triggered. Such information will all be saved in the gaming server.
Second, every user on the gaming server is self-existent. The data and requests of every user are independent with no interaction between different users. This is also the biggest difference between a gaming server and a general server. But clients may interact with each other. A simple example will be a person says something in a scene, and players “on the same screen” with him should also be able to see what he said. In this case, the gaming server should judge the distance players within which are regarded as players “on the same screen”, and these players will be broadcasted with the sentence that the player said.
This broadcast is a little complicated. First, the server needs to calculate which players are “on the same screen”. This refers to the computation of some constantly-changing attributes on the players we mentioned in the first point. Here we need to find the players on the same screen with the speaker according to the player coordinates, during which process the AOI concept is used. After the players for receiving this message are locked in, forwarding the message to them is another IO-intensive operation. We suppose there are ten people in the scene, so the sentence should be broadcasted to nine of them. But if there are 100 people, or 1,000 people, the data volume is larger, and the delay can't be too long. This imposes a very high requirement on the gaming server performance. If a server can process tens of thousands of connections at the same time running nginx, the gaming server of the same hardware configuration may only be able to process 1,000 to 2,000 connections. This is exactly because the gaming server is a CPU-intensive and IO-intensive type of server. In addition, gaming servers should not only have a high performance, but also have high stability. Otherwise, it is impossible for players to enjoy the game if the server keeps going down from time to time.
The gaming server should also have a sound data carrying capacity and processing capacity. While general servers are comparatively balanced in various aspects. When looking for gaming server providers, you should select those with outstanding CPU performance. Currently, the foreign AWS and domestic Alibaba Cloud provide more reliable server performances. Alibaba Cloud also enjoys good cost effectiveness and a good reputation, and you can make comparisons yourself. I also recommend Alibaba Cloud's game solutions which offer a full range of architecture covering client games, web games and phone games. For configurations of CPU-intensive gaming servers in particular, Alibaba Cloud ECS also provides some detailed schemes to solve the problem. Exclusive ECS is provided to enjoy dedicated CPU for extremely stable computing performance and it supports up to 6 Gbps of intranet bandwidth. It also supports 650,000 PPS max and is capable of 40-core 224G memory computing. It can be called the supreme server for the gaming server scenario. It is worth a try.