Baifu Travel is an online travel trading platform, covering air tickets, train tickets, hotels, cruise ships, bus tickets, admission tickets, tourism, shopping malls, and other sections. Baifu Travel integrates superior resources from around the world and provides one-stop intelligent turnkey solutions for global travel practitioners based on cloud computing and big data decision-making.
With the rapid development of the business, the Baifu Travel Technology Team has built a complete microservice architecture through open-source frameworks (such as Spring Cloud). It also introduces ECS in terms of underlying server resources and uses cloud computing to improve work efficiency and reduce work costs. After microservice applications are migrated to the cloud, there is no need to consider O&M steps (such as purchasing hardware resources and server installation), so the technical team can devote more energy to the implementation of business requirements. As the number of iterations of the system increases, some problems occur in the original microservice architecture.
From the perspective of system architecture, there is no essential difference between deploying microservice applications directly on cloud virtual machines and deploying them in physical computer rooms. The team still needs to maintain each application instance, including operating system adjustment, disk capacity planning, JDK installation, and other component installation. All these tasks are necessary when each cloud virtual machine is used.
Different development teams and developers need a separate set of test environments in the process of frequent iteration of the system. Over time, the technical team has created multiple sets of test environments, some of which contain all the microservice applications, and the overall resource utilization rate is particularly low, resulting in a large amount of resource waste. Moreover, the travel business has very clear business peaks and valleys. Microservice architecture can easily perform scale-out for each application. However, if the virtual machine resources used for scale-out need to be purchased in advance, a large number of resources will be idle.
The Serverless architecture that has emerged in the cloud computing field in recent years can solve these two problems. Since there is no need to purchase underlying server resources for Serverless applications, and users can directly apply for resources on demand, complex O&M work can be eliminated (such as capacity planning and operating system tuning). Therefore, the auto scaling mechanism of Serverless architecture can completely solve the problem of idle and wasted resources. As a result, the Baifu Travel Technical Team began to conduct technical pre-research on the Serverless architecture.
There are two common implementations of the Serverless architecture:
The first method is to containerize each microservice application, uniformly use Kubernetes for orchestration, and use the Elastic Container Instance (ECI) provided by cloud vendors to implement on-demand calls of the container layer.
This method has a high threshold. It requires an O&M team proficient in Kubernetes technology and requires the team to invest a lot of energy in containerizing applications. However, it is not suitable for small and efficient technical teams (such as Baifu Travel) for the time being.
The second one is to use a computing engine similar to AWS Lambda or Alibaba Cloud FC to refactor all business logic into functions.
This method requires the rewriting of previously written code and does not take advantage of the Serverless architecture in some amateur links with complex call links, which is not suitable for Baifu Travel.
After several rounds of technical research and in-depth exchanges with Alibaba Cloud technical experts, the Baifu Travel Technical Team believes Alibaba Cloud Serverless Application Engine (SAE) is most suitable for the Baifu Travel Serverless platform.
Different from other Serverless products, SAE directly supports development frameworks (such as Spring Cloud and Dubbo), which truly realizes the perfect combination of Serverless architecture and microservices architecture. Developers can deploy Serverless applications using WAR, JAR, and images and enjoy the technical dividends of Kubernetes and elastic containers on the cloud without learning Kubernetes and container technology.
Since SAE is a Serverless solution at the application layer, microservice applications previously built through the Spring Cloud framework can be smoothly and gradually migrated to the SAE platform without any code or business logic modification. This is also the most important reason why Baifu Travel fully adopts the SAE solution.
Microservice applications deployed on SAE can apply for resources on-demand and pay for the resources used by minute, avoiding expenses during inactive periods of business and effectively reducing costs. Microservice applications can also give full play to the value of auto scaling. SAE can start and stop with one click to avoid the problem of idle resources, especially in the test environment. For any application in the production environment, if you need to expand the instance, you can quickly pull up a new instance and automatically bind it with SLB and the registry.
In addition, through the Application lifecycle management capability provided by SAE, the Baifu Travel Technology Team has said goodbye to writing scripts for version release. Application deployment, application startup, application shutdown, association with SLB, instance scale-out, and instance scale-in can be visualized and performed through the Alibaba Cloud console. With SAE's version management and multiple canary release mechanisms, the risks during version updates are reduced further. For a newly released version, small-scale verification can be performed in the production environment first, and if it cannot meet the requirements, a one-click rollback will be conducted. SAE also provides a system monitoring function, which can help users understand the real-time running status of the system intuitively from multiple aspects (such as basic resources, JVM, and application links).
After the Serverless evolution based on SAE, Baifu Travel has saved a lot of costs in cloud resources and reduced the O&M work by more than half, laying a solid foundation for sustainable business development. In the future, Baifu Travel will continue to explore the Serverless architecture based on its technical features and fully enjoy the dividends of cloud computing while adopting new technologies.
Please visit the Serverless App Engine official website for more solutions and product details.
Alibaba Cloud Native - February 7, 2021
Alibaba Developer - September 6, 2021
Alibaba Cloud Serverless - June 13, 2022
Alibaba Clouder - February 9, 2021
Alibaba Clouder - October 27, 2020
Aliware - March 19, 2021
Alibaba Cloud Function Compute is a fully-managed event-driven compute service. It allows you to focus on writing and uploading code without the need to manage infrastructure such as servers.Learn More
MSE provides a fully managed registration and configuration center, and gateway and microservices governance capabilities.Learn More
Accelerate and secure the development, deployment, and management of containerized applications cost-effectively.Learn More
Visualization, O&M-free orchestration, and Coordination of Stateful Application ScenariosLearn More
More Posts by Alibaba Cloud Serverless