Serverless App Engine (SAE) allows you to quickly migrate microservices applications to the cloud. You can configure flexible application start and stop settings to reduce resource and O&M costs. This topic describes how SAE helps TapTap perform microservices transformation and quickly migrate applications to the cloud.
Background information
XD Inc. was founded in 2003 and is a global developer and publisher of video games. XD has extensive experience in game development, publishing, and operations. As of mid-2022, XD had published 38 free-to-play and paid games. In 2016, XD introduced a mobile game community and app store named TapTap. Players can download free-to-play or paid mobile games from the officially licensed channels, and can communicate with other players in the community. As of June 2022, TapTap had more than 50 million monthly active users around the world.
TapTap is different from traditional app stores that take a cut from games based on the traditional "joint operation" model. TapTap earns revenue from advertising. To provide users with a better gaming experience, TapTap provides interval, native advertisements whose content seamlessly fits into other non-commercial content. For example, TapTap places advertisements on strategic content, such as the game recommendation section on the home page, the content recommendation section on the discovery page, the hint words on the search guide page, the search suggestions that appear when you search for content by keyword, and the landing page that appears after a search is performed.
TapTap develops a serverless solution based on the preceding business scenarios. For example, the search, advertising, and recommendation services are implemented based on the automatic update and deployment of deep learning models. The algorithm developers of TapTap work based on the model experiment recording platform. The internal content is generated based on natural language processing (NLP) analysis.
Challenges
In the early stage of business development, TapTap deployed most of its backend services on Elastic Compute Service (ECS) instances, and managed the services by using Rundeck. This compromises the efficiency of deployment and management. The following table describes the challenges faced by TapTap before TapTap upgraded its infrastructure. The table also describes the benefits of the serverless solution that is provided by SAE.
Challenge | Benefit |
Improve the development and O&M efficiency | SAE is an integrated and out-of-the-box service that provides comprehensive microservices capabilities. SAE provides the following advanced enterprise-level capabilities and features: automatic image construction, built-in canary release, traffic throttling, environment isolation, application monitoring and diagnosis, and permission management. |
Meet business needs at lower manpower costs | SAE supports microservices models such as Spring Cloud and Dubbo, and provides maintenance-free microservices capabilities. This helps you reduce manpower costs. |
Ensure high reliability and performance | You do not need to manage or maintain the underlying infrastructure, such as IaaS, Kubernetes, microservices components, and APM components. You also do not need to use self-managed ZooKeeper, Eureka, Consul, or SkyWalking. SAE helps you reduce development and O&M costs. SAE guarantees the stability of the applications that you want to commercialize. |
Provide support for the Go programming language | SAE supports multiple technology stack programming languages such as Go, Java, PHP, Python, and Node.js. You can use an image to deploy a Go application. SAE provides the multi-language service registration and discovery capabilities based on Kubernetes Services. You can perform inter-service calls by using Kubernetes Service names. |
Solution
The following figure shows the solution that is used by TapTap.
TapTap integrates its estimation service with SAE. The estimation service is a mid-end microservices service that integrates the following capabilities required by the search, recommendation, and advertising services: model inference, characteristic development, and sample backtracking. All business lines can access the mature online estimation service of TapTap at low costs. For example, you can use the estimation service to estimate the click-through rate (CTR) of a suggestion on the search page and the CTR of an International Edition game.
SAE allows TapTap to quickly get started with serverless capabilities because SAE blocks the underlying operations such as resource management, environment management, and basic O&M component management. This way, TapTap can quickly release an independent estimation service for new scenarios and business.
TapTap integrates the alerting platform, event center, and logging service of SAE. TapTap can detect the status of online business in real time based on DingTalk alert notifications about out of memory (OOM) events, application restart, and error logs.
In addition, TapTap connects the Dubbo Go framework to the estimation service to allow the service to support multiple microservices capabilities, such as service registration and discovery, IP address-based direct connection, and graceful start and shutdown. Compared with the method of using ECS, the new solution provides advantages in O&M management, application development and release, and cost management. The new solution covers the entire process that contains application development, application release, and O&M operations. This helps TapTap greatly reduce development costs.
Effect
Minimal and effortless O&M: The R&D engineers of TapTap can develop, deploy, and manage applications with a few clicks and focus on business. SAE helps TapTap reduce O&M costs.
Minute-level application release without downtime: SAE supports canary release and rolling release. The SAE API can be integrated into GitHub and used to quickly deploy applications. SAE allows TapTap to release applications within minutes. This capability is suitable for new business.
Scaling operations within seconds: SAE provides multiple types of auto scaling policies to help TapTap improve resource utilization. For example, TapTap can configure a scheduled auto scaling policy or an auto scaling policy that is triggered based on metrics such as CPU, memory, queries per second (QPS), and response time (RT). As the business scale grows, TapTap can configure fine-grained auto scaling policies to greatly reduce server costs.
Multi-language microservices capabilities: SAE provides runtime environments for multiple programming languages such as Java, PHP, Python, and Go. SAE also helps TapTap implement low-cost microservices transformation for Go applications based on Kubernetes Service-based multi-language service registration and discovery.