Background information
Founded in January 2015, Guangzhou XMiles Network Technology Co.,Ltd. (hereinafter referred to as XMiles) is a mobile Internet technology company that aims to promote digitalization and implement high-quality self-motivated business growth. When XMiles develops various mobile apps such as utility apps, casual games, educational games, and fitness apps, XMiles focuses on user value and is driven by data. XMiles has developed more than 400 products. The number of downloads and installations of these products has exceeded 700 million. XMiles aims to become a worldwide leading developer platform. XMiles wants to provide developers with an end-to-end solution that integrates technologies and services based on standardized products and services, maintains continuous growth of product usage, and helps the developers of utility apps and casual games improve the success rate of product development.
XMiles uses a flat organizational structure. Each business team can independently select a technology stack and an infrastructure based on the requirements of the business team. Different internal teams use different computing platforms such as Elastic Compute Service (ECS), Kubernetes, and SAE. All platforms use the microservices architecture. Each computing platform provides unique advantages, but also needs to face different challenges. The game team of XMiles uses the SAE platform.
Challenges
The following table describes the challenges faced by the game team of XMiles. The table also describes the benefits of the SAE platform that is used by the game team.
Challenge | Benefit |
Most casual games have their own lifecycle. During the lifecycle of a game, business traffic during peak and off-peak hours is obvious. For example, the volume of traffic during the day is much higher than the volume of traffic at night. Traffic surges during the day occur at specific points in time and traffic surge at night occurs at 20:00. Almost no traffic exists from 2:00 to 6:00 in the morning, but the service cannot be stopped. The first time a game is released or each time an operational activity occurs, a large number of new customers log on to the game. The backend service must quickly respond to the changes in traffic volume. Therefore, XMiles requires a computing platform that supports auto scaling. | SAE provides multiple types of auto scaling policies to perform scaling operations within seconds. SAE can ensure business service-level agreement (SLA) when burst traffic occurs. SAE provides multiple policies and solutions such as image pre-download, DADI-based image acceleration, cold start acceleration for Java applications, and multi-threading during Java application runtime. This helps you deploy applications, run applications, and perform auto scaling with high efficiency. |
To improve service performance and quality, most casual games are stateless and can be split into different service modules, such as chat, red packets, backpacks, upgrades, user data acquisition, video processing, and advertising. In this case, the microservices architecture is suitable for business deployment. | SAE supports mainstream applications such as Spring Cloud, Dubbo, HSF, and Web. SAE is seamlessly integrated with Microservices Engine (MSE) and provides comprehensive service governance capabilities. SAE allows you to use code packages and images to deploy applications without the need to understand the underlying details of Docker images or Kubernetes. You can quickly get started with SAE. |
During the release process of a game, multiple new functional modules need to be iteratively added and need to be frequently released and upgraded. | After you create an application, you can upgrade the application by using the canary release method or phased release method. If an issue occurs on the new version, you can roll back the application to an earlier version with a few clicks to ensure the security and stability of the application. SAE is seamlessly integrated with Application Real-Time Monitoring Service (ARMS). You can monitor and diagnose applications in a visualized manner. You can also analyze, troubleshoot, and resolve online issues and configure alerts. |
The preceding issues can be fixed by using ECS instances or self-managed Kubernetes clusters. However, these resources require high O&M costs. Manual scaling cannot efficiently handle rapid changes in the volume of traffic. In most cases, a large number of idle resources exist. | You can focus on your core business and the development of business logic without the need to fix the issues that are related to underlying resources, such as cluster availability, capacity, and performance issues. SAE adopts an integrated and fully managed console that provides out-of-the-box lifecycle management and observability features for applications and jobs. This helps you troubleshoot issues with high efficiency. SAE also supports multi-vSwitch deployment to implement cross-zone disaster recovery. |
Solution
The following figure shows the SAE platform that is used by XMiles. 
You do not need to manage or maintain the underlying infrastructure, such as IaaS, Kubernetes, and microservices components. SAE is integrated with MSE to provide comprehensive microservices governance. You can configure the following microservices settings in the SAE console: health checks, graceful start and shutdown, configurations management, canary release, and one-click roll-back. In most cases, the game team of XMiles uses the Spring Cloud and Dubbo technology stacks. XMiles can use JAR packages to smoothly migrate existing gaming services as applications to SAE, and use namespaces to isolate the applications by business type. When XMiles creates applications, XMiles can select multiple zones to implement cross-zone disaster recovery. During the business runtime, the game team of XMiles can use the flexible auto scaling policies of SAE to efficiently handle unexpected traffic surges and periodic changes in the volume of traffic. This improves the O&M efficiency and reduces O&M costs. SAE provides built-in basic monitoring and is integrated with the Application Monitoring module of ARMS. XMiles can configure alert rules to help O&M engineers quickly identify and handle business alerts.
Effect
The game team of XMiles needs to only focus on business logic. After the game team hosts the resource layer to the SAE platform, the O&M operations are simplified. To cope with the rapid business iteration, XMiles uses Jenkins to encapsulate the SAE API and implement continuous integration and continuous delivery (CI/CD). This improves service release efficiency. Compared with the original scaling and deployment methods, the overall R&D efficiency of the game team of XMiles is significantly improved. The scaling operations can be performed within seconds instead of minutes. The release of new projects can be performed within minutes instead of days.