Alibaba Cloud Architect Interpretation of Four Mainstream Game Architectures

Introduction: The game industry is one of the earliest industries that Alibaba Cloud focuses on. In recent years, changes in the game industry and changes in cloud computing product technology have been advancing with each passing day. With the changes in industry and business, the evolution of technical architecture, and the iterative evolution of Alibaba Cloud products, the overall product technology selection is not the same in different game scenarios and business scenarios. This article will focus on the practical experience of Alibaba Cloud elastic computing products in the game industry.

I. Overview

The game industry is one of the earliest industries that Alibaba Cloud focuses on. In recent years, changes in the game industry and changes in cloud computing product technology have been advancing with each passing day. With the changes in industry and business, the evolution of technical architecture, and the iterative evolution of Alibaba Cloud products, the overall product technology selection is not the same in different game scenarios and business scenarios. This article will focus on the practical experience of Alibaba Cloud elastic computing products in the game industry.

Second, the game industry scene introduction

At present, various scenarios and industry development of the game industry are inseparable. A brief review of the development of video games, black and white machines in the 1980s, PC stand-alone games in the 1990s, online games became popular with the development of the Internet on the eve of the 00s, and after 2010, with the gradual popularization of mobile devices, mobile games began to rise in China .

In terms of game terminals, there are mainly: console games (often AAA games), PC games, mobile games and web games. At present, there is a trend of cross-platform multi-terminal games and cloud gamification.

There are many dimensions to the classification of games: RPG (role-playing), MOBA, competitive, FPS (shooting), leisure, card, chess, SLG (strategy) and so on. At present, there is a trend of fission of multi-category fusion gameplay.

With the domestic anti-addiction and version number factors, more and more high-quality games have been born in the game industry in recent years, the globalization and even regionalization of overseas, and the slowdown in the growth rate of the overall stock of users, long-term operations, refined operations, and private domain communities, etc. The way it operates is also changing.

3. Introduction to the technical architecture of the game industry

Different business scenarios have different technical architectures. For example, competitive games and card games have different computing requirements, and cloud games have different architectures from conventional online games. Here is a brief introduction to its architecture from the four common scenarios of game servers and game platforms, big data, and cloud games.

1 Game server architecture and product practice

Business scene

Game servers, from the perspective of game types, include RPG, FPS, MOBA, SLG, chess and card, leisure, etc.; from the perspective of game platforms, there are usually consoles, mobile phones, PCs, etc.; from the perspective of business distribution, there are global, domestic, overseas, from From the perspective of deployment architecture, there are centralized deployment and partitioned deployment; from the perspective of technical architecture, the game industry also has a trend of gradual decoupling of layers, but compared with Internet applications, it has certain uniqueness.

Technical Features

Because of the strong interactivity of games, the technical architecture of games is unique compared to other Internet applications. The game needs to maintain a session connection, that is, a long connection from a client to a server, so as to facilitate timely feedback on the player's operation and behavior in the client and push it to other players in the same game or battle, so games generally have an impact on network quality. More sensitive, poor network quality will disconnect or reconnect long connections, causing players to drop out. The game also needs to maintain the state of the session, that is, the server will maintain a copy of the player's entity. When the player operates, the data of the next communication will depend on the data of the previous communication. This is also some MMO (multiplayer online) large game pairs. One of the reasons for the high network throughput performance requirements. Another example is FPS, MOBA and other multiplayer battle games, which are more interactive, have lower tolerance for network delays, and require low latency. Because the game needs to record the player's operations and results in a relatively high density, it has the characteristics of frequently writing data, and such scenarios require strong IO performance. Because of the game's strong interactivity and low latency, its technical architecture is also different from that of Internet applications. While gradually decoupling in layers, it is necessary to ensure the interaction effect of game players, and also depends on the computing power of the underlying server.

These are all common characteristics of game scenarios: long-term connection to maintain session, maintain state, low-latency network, high IO throughput, and high computing performance.

Deployment plan

The deployment architecture of the game will formulate game services based on the characteristics of the game business and the needs of game operations. There are partitioned servers, the whole region and the whole server business logic, the partition and the whole region and the whole server. The biggest structural difference is whether the data is a set. From the perspective of deployment methods, it is mainly centralized deployment and sub-regional deployment.

Centralized deployment means that no matter where the gamers are, game services are concentrated in one area, which is suitable for game types that usually do not require high network latency, such as leisure games; partitioned deployment means that game servers are deployed in different areas according to the geographical distribution of game players, which is convenient for the nearest Access, suitable for game types with high network latency requirements, such as MOBA and FPS.

Typical Architecture

i. Introduction to MMORPG game architecture

The MMO class has the characteristics of high concurrency. The high computing load of a large number of players concurrently has extremely high requirements on the computing power and stability of the server. At the same time, MMO games have relatively strong PVE or PVP characteristics, and have low tolerance for network delays.

Among them, the gateway server is responsible for the forwarding of all network data packets, which is usually the point where the network load is more concentrated and requires higher network throughput. A single game area carries a high number of players. The logical server is usually divided according to the scene map, and the scale can be realized by partitioning.

The data center server is responsible for caching player data and asynchronously storing it in the database to ensure that player customers can quickly obtain and write data. For high availability requirements, it is necessary to cooperate with the application layer to implement a data fault tolerance mechanism.

The log server bears the pressure of log collection and processing for all business behaviors in the region, and has high requirements on disk write performance. It is usually implemented in multiple groups.

1.png

Elastic computing product recommendations:

(1) MMO game server performance and stability requirements, it is recommended to use the 7th generation ECS instance, and select c computing type (CPU and memory ratio 1:2)/g general-purpose type (1:4)/r memory according to actual needs Type (1:8), Intel Ice Lake 2.9GHz base frequency 3.5GHz turbo frequency provides ultra-high performance, which can better optimize the gaming experience.

(2) For asynchronous storage and log servers, for scenarios that require high disk read and write performance, it is recommended to use ESSD PL 0/1/2/3 on the cloud to be selected according to business performance needs to avoid disk read and write bottlenecks.

(3) In the daily version update of the game, fast replication of regional images in each region is required. Based on the ability of ESSD snapshots to replicate in different regions, the mirror replication efficiency can be improved.

(4) Scenarios such as partitioning and distributing servers often need to quickly open the server, roll out the server, and combine the server. The use of cloud operation and maintenance tools such as CADT cloud speed, ESS elastic scaling, OOS operation and maintenance orchestration, and ROS resource orchestration can improve the cloud Operational efficiency.

ii. Introduction to FPS and MOBA game architecture

MOBA games mainly include several main parts such as PVP system, PVE system, game platform, etc. Among them, PVP battle is the core of MOBA/FPS games.

PVP, PVE, and game platform functions are deployed in the same VPC to form a large game area; battle servers are (often) deployed separately across regions.

The game client first connects to the login server to complete the game platform logic such as login authentication and billing. In order to avoid single point problems, game platform services often require high availability solutions. High availability solutions on the cloud, including convenient operation and maintenance tools, can be used to meet business high availability requirements.

FPS/MOBA competitive games are often particularly sensitive to delays. It is conceivable that the game scene in competitive games: the player controls the characters, moves gracefully on the map, the gunshots are dense, and each bullet is a time plus space Vector calculation, and the calculation needs to be completed in the main process, then the computing power demand will explode exponentially with the increase of the number of players in the room. The computing power requirements of a 5V5 room and a large room with 100 people (eating chicken) are completely different.

In this part of the game, the computing power is heavy, and Alibaba Cloud 7th generation high frequency or 7th generation instances are recommended. Higher single-core performance provides better combat effects.

Battle room games, because of the peak and valley characteristics of the business itself, and the elastic ability to flexibly use cloud resources, tend to better optimize the overall cost of resource use. Alibaba Cloud Elastic Compute itself provides very flexible payment methods, including regular pay-as-you-go instances, monthly and annual subscription instances, and deducting pay-as-you-go instance resources through savings plans/reserved instance coupons. excellent cost.

In addition, in order to further release the efficiency of development, operation and maintenance, some current games also adopt the containerized technology architecture. The combination of Alibaba Cloud's ACK+ECS/ECI elastic container instances further releases the flexibility and elasticity of basic resources. .

2.png

2 Game Platforms

Business scene

The main services provided by the game platform (not limited to FPS and MOBA): official website, customer service, registration, login, recharge, exchange, mall, push, announcement, community, SDK, email, SMS and other public services; including content review, video recording , barrage, transcoding, editing, RTC and other basic services required by business, as well as operation and maintenance monitoring, publishing platform, testing platform and other platform services.

This part is closer to the general Internet technology architecture, decoupling with service as the granularity, access -> gateway -> application -> database.

Technical Features

This often requires building a highly available infrastructure to improve stability, and a certain degree of flexibility is often required during business emergencies. Compared with game services, this part of containerization is more popular, and it is easier to cope with traffic peak scenarios through elastic container instances on the cloud. In video recording scenarios, when real-time requirements are high, it is often built based on GPU capabilities. This part of Alibaba Cloud also provides vGPU/cGPU capabilities to release the flexibility of GPUs.

 

3.png

3 Big data architecture and product practice

Business scene

The business performance of the game's entire life cycle, user retention, business transformation, and in-game gameplay strategies are all business support data that game manufacturers are very concerned about.

Big data is the main technical means of current game business operation and game operation. Different scenarios have different real-time requirements. Real-time query and retrieval are usually scenarios such as business analysis, customer acceptance, player monitoring, and online; offline reports are usually scenarios such as player behavior analysis, user portraits, and feature mining.

In general, real-time services are mostly business query and simple calculation tasks, such as the analysis of purchase volume conversion; offline services are basically analysis and prediction tasks, such as game play analysis.

Architectural Features

From the perspective of technical architecture, thanks to the high richness of the open source community technology stack, there are many specific technology choices for big data. The overall change from the integration of storage and computing to the separation of storage and computing has also resulted in the integration of data warehouses, data lakes and even lakes and warehouses. etc. concept.

From the perspective of the data architecture process, from data source -> data acquisition, transmission -> data calculation, storage -> data application, the optional technical solutions also need to be adapted to local conditions.

From the perspective of deployment architecture, different game companies are in different data construction stages and will have different choices, including completely self-built, self-built big data based on the cloud, hosting on the cloud, and using more mature cloud-based platforms. Product technology to enrich the overall big data capability set, and the latter has become the choice of more and more customers.

Take the big data solution on the cloud as an example, such as the real-time computing part, select SLS collection, Kafka data gateway channel, use Flink for data calculation, ES or CK for data analysis, and ADB and QuickBI for data application display. The offline solution uses OSS for cold data storage, Spark, Hive, HDFS and other components for data computing and storage, CK aggregation and analysis, and Dataworks for data application.

product model

The selection of specific computing storage products is mainly based on different business characteristics and big data application characteristics, and is selected according to data capacity, IOPS, throughput, read and write characteristics, and cost performance.

For example, in the real-time computing/near-real-time computing scenario just mentioned, Flink has the characteristics of high performance and low latency, so it is a scenario with intensive computing and high network performance. It is recommended to select a seventh-generation ECS instance or a sixth-generation enhanced instance; for example, HDFS requires large storage capacity , high throughput, D-series local disk instances are recommended, such as D2S storage-type local disk instances. In scenarios with many processing results such as Remote Shuffle Service and frequent read and write processing, such as a large number of join calculations, it is necessary to comprehensively consider computing, network, storage performance and comprehensive costs to select general-purpose instances (such as 7th generation ECS instances) or i-series local disks instance. Therefore, in the final selection of resources on the cloud, in the early stage when the performance is satisfied, it is necessary to evaluate whether the cost of data transmission through the network (cloud disk) is high, or the calculation cost of local data acquisition (local disk) is high, and different models and different orders of magnitude are selected. different.

From memory processing (highest cost, best performance, smallest storage capacity), SSD local disk, HDD local disk, ESSD cloud disk, OSS object storage (best cost, average performance, largest storage capacity), gradually layered decoupling, It also brings a benefit: it fully releases the elastic capabilities on the cloud, and can use lighter elastic computing products (such as SPOT preemptive instances, or ECI container instances) to perform big data computing to achieve better elastic capabilities to meet business needs Demand can also save more costs.

4.png

4 Cloud game architecture and product practice

Business scene

Since ONLIVE put forward the concept and products of cloud games in 2009, cloud games have gone through a technical cycle, especially in the past two years, we can also see more and more companies pay attention to cloud games and invest in cloud games. The platform is based on the streaming capability and drives the game operation in the form of video streaming, enabling users to enjoy higher-quality game products at low cost, and covering the PC, mobile, TV and other terminals according to the actual needs of cloud games Scenes.

Architectural Features

Cloud games are mainly divided into terminals and clouds. The terminal part of the terminal equipment based on Windows, iOS, Linux and other operating systems includes mobile phones, tablets, computers, TVs, VR all-in-one machines, etc. The cloud architecture mainly includes the game application layer, cloud game platform layer, and IaaS basic resource layer. The application layer includes various types of game applications such as PC games, mobile games, VR games, and H5 games. The platform layer is the necessary operation platform and support for cloud games. Platform, streaming technology platform, etc.; IaaS basic resource layer includes basic network, GPU server based on X86 architecture and ARM architecture.

5.png

Products Recommended

The implementation of cloud games has also experienced many technical challenges. In order to meet end-to-end high performance and low latency, network scheduling, instruction streaming, encoding and decoding, and multi-terminal SDK adaptation are all inevitable in cloud gaming scenarios. technical issues.

For cloud computing power, Alibaba Cloud solves the problems of cloud rendering, streaming, and encoding and decoding, and uses a full range of GPU products to meet the needs of cloud mobile games, PC games, VR, and even enterprise-level visual rendering scenarios.

6.png

To sum up, Alibaba Cloud Elastic Compute helps game customers to provide better performance experience to cloud game players through a full set of technologies such as streaming, encoding acceleration, and rendering acceleration on the cloud. Based on Alibaba Cloud's global data center, it can help cloud game customers Covering more users, through the various product forms and overall flexibility of GPU, it also helps game customers to build their cloud game business more quickly and flexibly.

7.png

4. Summary

Alibaba Cloud provides large-scale infrastructure cloud services through years of technology accumulation and continuous operation. Currently, it has deployed 26 regions and 82 availability zones around the world, helping game customers run games efficiently and stably through excellent and stable performance. business, provide players with an extremely smooth gaming experience, and continuously help game customers optimize cloud costs through technical means.

8.jpg

Going overseas for domestic business and games is also one of the major trends at this stage. Many game companies have made going overseas from a business option to a must. In March 2022, Alibaba Cloud launched the two major regions of South Korea and Thailand, which can provide a smoother and more stable game experience for localized game business, hoping to provide more game customers in the business field of overseas. help.

Of course, as the intersection of the two popular fields of content and technology, the game industry is changing with each passing day, and the structure is constantly changing with the needs of front-end business. Alibaba Cloud Elastic Computing has also launched different cloud server types and payment methods, as well as cloud operation and maintenance kits, to help customers reduce costs and increase efficiency.

In the future, Alibaba Cloud will continue to pay close attention to the game industry, and will always provide the industry with a solid, stable and convenient infrastructure to jointly promote the healthy development of the game industry.

                           

Original link: https://developer.aliyun.com/article/887270?

Copyright statement: The content of this article is contributed by Alibaba Cloud real-name registered users. The copyright belongs to the original author. The Alibaba Cloud developer community does not own the copyright and does not assume the corresponding legal responsibility. For specific rules, please refer to the "Alibaba Cloud Developer Community User Service Agreement" and "Alibaba Cloud Developer Community Intellectual Property Protection Guidelines". If you find any content suspected of plagiarism in this community, fill out the infringement complaint form to report it. Once verified, this community will delete the allegedly infringing content immediately.

Guess you like

Origin blog.csdn.net/alitech2017/article/details/124296120