21 Online Application's Serverless Practices

21 Online Application’s Serverless Practices #

Challenges of Serverless Adoption in Enterprise-Level Applications #

img

Serverless technology is the third-generation general-purpose computing technology following virtual machines and containers. Compared to traditional back-end architecture, Serverless has advantages such as zero maintenance, cost savings, rapid deployment and delivery, and flexibility and scalability. In recent years, it has received increasing attention and favor from enterprises and developers. However, there are still some challenges in implementing Serverless in enterprise-level applications.

According to a statistics report from consulting firm O’Reilly at the end of 2019, 40% of organizations are already using Serverless technology, while the remaining 60% consider the following top 3 challenges:

  • High development difficulty and entry barriers, making it difficult to lightweight business and smoothly migrate existing applications;
  • Concerns about vendor lock-in, as each vendor wants to introduce their own standards in the form of FaaS-based Serverless products, lacking open-source specifications and ecosystem support. Similar scenes have played out in the container field until Kubernetes became the de facto standard, while Serverless is still looking for its own de facto standard;
  • How to conveniently develop, debug, monitor, and deeply integrate with existing businesses.

Introduction to SAE (Serverless App Engine) Product #

So how do we overcome these three major challenges faced by Serverless technology? Let me introduce to you SAE, a low-threshold Serverless PaaS (Platform-as-a-Service) platform that can be used directly without any code modifications. It is the best choice for smoothly migrating enterprise online businesses to the cloud.

2.PNG

SAE provides a more cost-effective and efficient application hosting solution. Built on top of a unified K8s (Kubernetes) technology foundation, it helps users shield the complexities of IaaS (Infrastructure-as-a-Service) layer and K8s cluster operations, providing capabilities such as computing resources, elasticity, and isolation. Users only need to focus on the specifications and number of application instances.

At the application layer, in addition to providing lifecycle management and multiple release strategies, SAE also provides monitoring, logging, and microservice governance capabilities to meet the observability and governance needs of applications. It also provides advanced capabilities such as one-click start/stop and application orchestration to further improve efficiency and reduce costs. The core use cases mainly target online applications such as microservices, web applications, and multi-language applications.

In terms of developer tools, SAE has been well integrated with CI/CD tools such as Jenkins and Cloud Effect. Whether it is deploying applications to SAE or deploying applications from a local environment to the cloud using the Cloud Toolkit plugin, SAE covers the entire process of application migration to the cloud.

3.PNG image.gif

In addition to the extreme elasticity, zero maintenance, and cost saving features that Serverless experience brings, SAE focuses on providing users with full-stack capabilities at the application layer. This includes enhanced support for microservices and integration with capabilities closely related to applications, such as configuration, monitoring, logging, and traffic control. Combined with zero code modifications by users, this is also an important advantage that sets SAE apart from other Serverless products, ensuring a smooth migration of enterprise online applications.

4.PNG

SAE has several typical use cases. One is migrating existing businesses to the cloud, especially microservices and Java applications. It also supports rapid migration/relocation of monolithic applications in other languages, providing extreme delivery efficiency and an out-of-the-box experience. In terms of industries, SAE is particularly suitable for online businesses with large traffic fluctuations, such as e-commerce promotions and online education. Additionally, as an application PaaS, SAE can also be integrated with industry SaaS at higher levels, helping users build industry SaaS solutions more quickly.

Core Metrics of the Product #

5.PNG

SAE has three core metrics: container startup time of 20s (the defined metric is the time from pulling the image to container startup, excluding application startup time). We will optimize this metric to be within 5s through various technical optimizations, ensuring fast scaling efficiency for users during sudden surge scenarios. The minimum specification supports 0.5 cores and 1GiB, meeting more granular resource demands. Compared to ECS, deploying a development and testing environment with SAE can save costs by 47% to 57%.

Best Practices #

Based on the previous introductions, we have learned about the features, advantages, and use cases of the product. Finally, let’s provide detailed examples of several best practices for implementing Serverless.

1. Low-threshold solution for transforming into a microservices architecture #

image.gif 6.PNG

With the rapid growth of businesses, many enterprises face the challenge of transforming from monolithic to microservices architecture. The self-built microservices frameworks (such as Spring Cloud / Dubbo) may no longer meet the stability and diversified needs of the enterprise. By providing out-of-the-box microservices capabilities and stability support, SAE allows these enterprises to quickly and easily complete the transformation to a microservices architecture with low entry barriers. This enables them to quickly launch new businesses while focusing on their core operations.

SAE can be considered as the best practice for microservices in the Serverless industry, and also the best practice for Serverless in the microservices industry.

2. Cost reduction solution for non-operational, one-click start/stop development and testing environments #

7.PNGimage.gif

For large and medium-sized enterprises, development and testing environments are often not used 24/7. Maintaining application instances for a long time leads to high idle resource waste. In some cases, the CPU utilization of these enterprises can be close to 0. By utilizing the one-click start/stop capability of SAE, these enterprises can flexibly release resources on demand. By only keeping the development and testing environments active, they can save 2/3 of the machine costs, which is a significant saving.

3. Solution with precise capacity planning and extreme elasticity #

image.gif8.PNG

Industries such as e-commerce and security often face unexpected traffic surges. Previously, these companies had to estimate peak values in advance and maintain ECS resources based on those estimates. However, the capacity estimation is often inaccurate, resulting in resource waste or insufficient capacity. This can even affect the system’s SLA.

By using the combination of load testing tools and SAE, elastic strategies can be accurately set based on the load testing results. These strategies can then be compared with real-time monitoring metrics, allowing the system to automatically scale up or down as needed. This eliminates the need for capacity planning and achieves second-level elastic efficiency, easily handling peak loads.

4. Building an efficient DevOps ecosystem #

9.PNG

SAE has built an efficient DevOps ecosystem that covers the entire process of application development, deployment, and operation. Large and medium-sized enterprises often use enterprise-level CI/CD tools such as Jenkins or YunXiao to deploy SAE applications. This completes the entire chain from source code to build and deployment. Small and medium-sized enterprises, as well as individual developers, often choose developer tools such as Maven plugins and IDEA plugins to deploy applications to the cloud with one click. This facilitates local debugging and improves the developer experience. After the deployment, governance and diagnosis of the application in operation can be performed, such as traffic limiting, fault tolerance, application diagnosis, and data-driven operational analysis.

Summary #

In summary, this article mainly focuses on the practical implementation of Serverless for online applications. The challenges mentioned at the beginning of the article can be effectively addressed by SAE:

  • No need to modify the programming model, zero-code transformation, providing a smooth transition for developers to migrate existing applications to the serverless architecture.
  • Based on K8s (the de facto standard in the container industry), the upper-layer application-level full-stack capabilities provided by SAE have zero impact on users. Thus, there is no need to worry about vendor lock-in issues. Instead, users can focus more on the application perspective and enjoy a one-stop PaaS experience.
  • In terms of debugging, monitoring, and observability, SAE has done a good job integrating with developer tools. In the future, it will become more and more similar to the familiar ECS operation and maintenance experience for developers. Overall, SAE is the best choice for enterprises to smoothly migrate their online businesses to the cloud.