×
Community Blog Global Gaming Servers (1): Content Acceleration and Architecture Comparison

Global Gaming Servers (1): Content Acceleration and Architecture Comparison

This article series introduces several architecture designs for global gaming servers and discusses the advantages and disadvantages of each approach.

Every day, the gaming industry is evolving at a rapid pace, along with the rapid growth of international consumer base. For game players, network and server latency can result in slow responses and being disconnected from the game itself. Hence, it has become a primary objective for the gaming industry to address these issues to enhance players' experience. Reliable servers, real-time data analysis and low-latency are essential for high-quality content and outstanding player experience.

This makes gaming a natural fit to run on cloud. Moreover, gaming companies no longer need to estimate the game servers they will need or even to make additional purchases in advance, as cloud computing offers flexible and scalable infrastructure.

Mobile gaming is now the largest segment of the gaming industry. With modern mobile technologies developed enough to handle medium-to-heavy workload games, many console gaming companies have entered the mobile segment. Mobile gaming tends to lean toward innovation, VR/AR, mobility, connectivity, and even going global. The underlying architecture for mobile gaming should be able to handle heavy workload and global connectivity while keeping costs at a minimum, making cloud computing the best choice for mobile gaming companies.

In 2016, Supercell launched a new game - Clash Royale, which laid the benchmark of the global server architecture in the gaming industry. In China, Clash of Kings, a game developed by Elex Technology, also achieved remarkable success. Following the success ladder of these games, many mobile gaming companies have chosen global cloud server architecture as a default solution to going global.

Technical Challenges

  • Architecture Design
    The key challenge to the Global Server architecture for mobile games is how to design and deploy the transport layer, business layer, and data layer to fit different game genres.
  • Network Latency
    Latency is inevitable during data transmission. But how to reduce latency and minimize its effect on players' visual experience is critical to guarantee the seamless access and fair competition of players across the world.
  • Data Read and Write
    Efficient data read and write, with data consistency.
  • Resource Management
    Centralized and efficient game O&M and resource management.

Business Logic Architecture

The following architecture is applicable to browser games, mobile games, and console games. It is constructed by two main modules: client services and operation services.

1

Global Server Game Acceleration

The architecture of Global Server Game Acceleration (or Global Accelerator) is built with the centralized game servers deployed in a single region, and edge locations deployed worldwide with the accelerated public network access. Players are geographically routed to the closest edge locations through Express Connect. This aids to minimize the latency, ensures high-quality performance and availability and to realize the global acceleration.

Currently, the prime pain area of global server games is the unfair gaming experience caused by different network latencies of players located in different regions. The technical complications such as price and quality variations of dedicated network connection from the third-parties, the high O&M costs involved in the worldwide edge location deployment, complex proxies are to name a few.

Mobile Accelerator

Game developers may encounter the following problems:

  • Slow app installation and launch
  • Slow game loading
  • High latency
  • Slow interaction among the carriers like China Mobile, Unicom, and Telecom
  • Chaotic carrier IP libraries
  • High failure rate of server access
  • Low availability with non-WiFi connection
  • High packet loss rate and domain name hijacking
  • Poor interactive experience
  • Differences in gaming experience of the users spread across the world.

These problems make Alibaba Cloud Mobile Accelerator the most appropriate fit to resolve the "last mile" acceleration between clients and edge locations. See the following figure.

2

Global Acceleration

With Alibaba Cloud Global Acceleration, you do not have to manually configure content delivery acceleration to edge locations, which can be complicated, and requires longtime debugging. Global Acceleration ensures you the high availability, scalability, performance, and flexible routing.

Basically, Global Acceleration provides the point-to-point acceleration by using EIPs (elastic IP addresses) to map the ECS instances or VPC Server Load Balancer instances on your centralized servers to the public network. Global Acceleration speeds up the cross-region and cross-country connection to the servers, as shown in the following figure:

3

Whole-Path Acceleration

By combining Mobile Acceleration with Global Acceleration, we can accelerate the entire data path from the server to the client. In this solution, Mobile Acceleration speeds up the connection between clients and edge locations based on dynamic routing, while Global Acceleration speeds up the connection between the centralized servers and edge locations through Express Connect. See the following figure.

4

Gaming Architecture

Based on the market research, in-depth discussion with our clients, and our own research on game architectures, we have designed and developed the following four architectures for global server games.

Fully-Centralized Deployment

For global server games, fully-centralized deployment is the preferred choice of architecture for games that are not sensitive to network latency. In this architecture, the game access layer, business logic layer, and data layer are all centrally deployed in the same region. Players across the world, access the game over the Internet. The following figure shows the deployment architecture.

5

Note: For this architecture, we recommend the c5 family of computing-type instances. This instance type can support most game services that are not sensitive to network latency.

Applicable Scenarios

This architecture is suitable for global server games where players are concentrated in a certain region and the gameplay method is designed to be insensitive to network latency. If your preliminary game server architecture design is not suitable for the distributed deployment (for example, if no data synchronization mechanism is set in the logic architecture), you must select fully-centralized deployment when you launch your game.

Architecture advantages and disadvantages

  • Architecture advantages:
    • Easy deployment
    • Better gaming experience in the primary coverage region
    • No data consistency issues
  • Architecture disadvantages:
    In this architecture, not all players can access through the nearest node.

Centralized Deployment and Network Optimization

In this architecture, the game access layer, business logic layer, and data layer are centrally deployed in a single region. Then, Global Acceleration is deployed on the Alibaba Cloud nodes for the regions you need to cover.After using intelligent DNS for scheduling, players in the various regions automatically access the game from the nearest node. Alibaba Cloud Express Connect provides an intranet connection between the game service and the various access points. The following figure shows the deployment architecture.

6

Note: We recommend using the sn1ne family of computing network enhanced instances. This instance type is an enhanced network model, which can meet the architecture's low-latency needs.

Applicable scenarios

This solution is appropriate for game server architectures that are unsuitable for the distributed deployment. It is a better choice for operators who want to cover as many regions as possible, while keeping the game's network latency below 200ms.

Architecture advantages and disadvantages

  • Architecture advantages:
    • Easy deployment
    • Network acceleration
    • No data consistency issues
  • Architecture disadvantages:
    Fixed latency (For some games, differences in fixed latency can lead to an unfair gameplay. In this case, you must use frame synchronization or other methods to eliminate the latency difference).

Centralized Data and Distributed Logic

In this architecture, the data layer is centrally deployed in a single data center. Then, the game access layer, business logic layer, and cache layer are deployed in each of the regions that must be covered. The distributed architecture is shown in the following figure.

7

Note: We recommend using one of the following two instance type families:

Applicable scenarios

This architecture is suitable for games where players mostly interact with others in the same region and that have high requirements for network latency (for example, below 120ms, the minimum latency noticeable by human eyes). This architecture is a good choice for action games that want to equally cover all regions of the world.

Architecture advantages and disadvantages

  • Architecture advantages:
    • Players can access through the nearest node
    • The game logic is computed on the nearest node (local cache server data sync function: After a player exits, data is written back to the database in real time, 100 rows of dirty data is written every 5 seconds)
    • Almost no data consistency issues
    • Flexible distributed node adjustment
  • Architecture disadvantages:
    • Must be deployed in multiple regions
    • When players interact across regions, the latency of one party increases (a special solution can resolve the problem of latency differences)
    • A complete dirty data writeback function is required to ensure data consistency

Key design aspects

This section gives a detailed description of several key design aspects.

  • Key aspect 1: Centralized game database deployment
    In global server games, gaming rule interaction may occur between any players. Therefore, gaming data, player account data, and global game data (such as rankings) between, must be centrally deployed in a single IDC.

    The player data read/write frequency is high and a large proportion of records have a single line. Therefore, it is best to use distributed storage architecture. For example, you can use the Alibaba Cloud DRDS and ApsaraDB for RDS products for a database and table-based splitting. This avoids the performance bottleneck of a single database instance.

  • Key aspect 2: Regional player access
    As this type of game is a service provided to players around the world and access to Chinese networks from other countries may be poor, you need to provide the nearest access to the players in various regions around the world.

    For example, based on the distribution of Alibaba Cloud data centers, you could deploy access nodes in South China, North China, Southeast Asia, Europe, and North America. Specifically, you can deploy access services in the China East 2, China North 2, Singapore, Germany, and the East US regions.

  • Key aspect 3: Player data is regionally cached and regularly written back to the central data center
    The players in various regions play together. To avoid the network latency of the remote data reading to affect the overall gaming experience, player data must be regionally cached and then regularly written back to the central data center in batches. This way, the regional game logic servers only need to remotely read data once, during player log on. Then, they can quickly read player data from the cache server.

    For example, you can use the Alibaba Redis product for caching, allowing you to implement data caching and persistence. In this way, you do not lose data even if the leased line connection is unavailable.

  • Key aspect 4: Intelligent DNS allows nearby access
    When players from around the world access the game, the best option is to use the intelligent DNS service for auto scheduling. You can also create your own scheduling service. During scheduling, players' locations must be used to schedule players in the same region to the same access point. If the gameplay involves player matching, the matching algorithm must consider the player's location.
  • Key aspect 5: Players playing against each other should be controlled within the same region as much as possible
    Because a game logic server is deployed in each region and player data is cached regionally, the backend should limit direct combat to players in the same region as far as possible.
  • Key aspect 6: Centralized storage of global data
    Because rankings and other global data is generated by summarizing data from all regions, this data must be centrally stored. Then, each region can regularly pull the necessary global data (the data pull interval must be set according to the ranking generation cycle). However, the previous data version in the local cache cannot be deleted before the latest data is pulled, and the services used to generate global data must also be centrally deployed.
  • Key aspect 7: Cross-region player access
    It is possible that a player may log on from different regions, during each logon, the system must check if the current logon access point is the same as the last access point used. If they are different, the player data in the cache of the previously used access point must be written back to the database. Then, the player is permitted to log on from the new access node. This prevents data inconsistencies.

Fully-Distributed Deployment

In this architecture, the game logic and game data are deployed in a distributed manner. Only global game services and data are centrally deployed. This architecture is suitable for games with low read/write frequencies and less-strict network latency requirements. The following figure shows the deployment architecture.

8

Note: We recommend using one of the following three instance type families:

  • The cm4 family of high-frequency general instances is suitable for fully-distributed architectures with high requirements for network, computing, and storage resources.
  • The se1ne family of memory network enhanced instances provides high network packet sending and receiving capabilities.
  • The g5 family of general instances provides a distributed cache function while balancing the ratios of various resources.

Applicable scenarios

This architecture is suitable for games with high network latency requirements, a great deal of interaction between players in different regions, equivalent coverage in all regions, and a complete data synchronization mechanism in the game architecture.

Architecture advantages and disadvantages

  • Architecture advantages:
    • Players can access through the nearest node
    • Game logic is computed on the nearest node
    • The game business logic layer is completely stateless
    • Fast data reading and writing speed
  • Architecture disadvantages:
    • Must be deployed in multiple regions
    • Large amounts of data must be synchronized across different regions

Key design aspects

This section gives a detailed description of several key design aspects.

  • Key aspect 1: Centralized storage of global data
    As the rankings and other global data are generated by summarizing data from all regions, this data must be centrally stored. Then, each region can regularly pull the necessary global data (the data pull interval must be set according to the ranking generation cycle). However, the previous data version in the local cache cannot be deleted before the latest data is obtained, and the services used to generate global data must also be centrally deployed.
  • Key aspect 2: Regional player access
    As this type of game is a service provided to players around the world and access to Chinese networks from other countries may be poor, you need to provide nearby access for players in multiple regions around the world. For example, based on the distribution of Alibaba Cloud data centers, you could deploy access nodes in South China, North China, Southeast Asia, Europe, and North America. Specifically, you can deploy access services in the China East 2, China North 2, Singapore, Germany, and US East regions.
  • Key aspect 3: Intelligent DNS allows nearby access
    When players from around the world access the game, it is best to use the intelligent DNS service for automatic scheduling. You can also create your own scheduling service. During scheduling, players' locations must be used to schedule players in the same region to the same access point. If the gameplay involves player matching, the matching algorithm must consider the player's location.
  • Key aspect 4: Real-time game database synchronization
    This architecture allows players in different regions to play across servers. Therefore, the game databases of the different regions must be synchronized. You can use Alibaba Cloud DTS for real-time data synchronization, or migrate data when players interact across servers. The data synchronization method used in this solution is described as a special solution later in this article.
0 0 0
Share on

Alibaba Clouder

2,599 posts | 764 followers

You may also like

Comments