By Chen Tao
The Serverless concept was introduced in 2012, and the related cloud product, Lambda, was launched by AWS in 2014. Since then, six years have passed.
Although there is no agreed definition of Serverless in the industry, most developers remind themselves of Lambda and keywords, such as functions, pay-as-you-go (number of calls), and event-driven. When Serverless was released in 2012, it was just like the cute "purple potato boy" shown below. Purple means mystery. Serverless was a black technology at that time.
The great influence and black technologies brought by AWS have made Serverless impressive. However, even though six years have passed, many people still equate Serverless with Lambda or Function Compute (FC). What a pity!
Nowadays, enterprises are in the stage of comprehensive digital transformation, and the entire technical architecture has yearned for huge technical benefits based on cloud-native. Serverless is essentially cloud-native. Thus, it is necessary to understand Serverless and the related products published over the last six years. By doing so, you can leverage the technological value of Serverless. Serverless will facilitate business development for frontend, backend, architect, SRE, or CTO.
The industry has been trying to define Serverless. For example, the Cloud-Native Computing Foundation (CNCF) defines it as "NoOps and Pay-as-You-Run." Berkeley claims Serverless to be "FaaS + Backend as a Service (BaaS)." However, the Serverless concept is clear enough, with no need for redefinition. It combines the words "Server" and "less," referring to the core idea of "no more attention to the Server." By contrast, in the IaaS era, developers bought servers, installed various tools, and developed their own businesses.
Serverless does not mean a Server is no longer needed. It allows common developers to shift focus from the Server, which means "smart elasticity," "fast delivery," and "lower costs." These are also the typical features of Serverless products.
Therefore, there is no need to define Serverless, since it has been clearly described. A more intuitive understanding can be gained when viewing Serverless products in various technical fields.
The PaaS concept is very wide. It is between IaaS and SaaS in a broad sense. Let's take the Google App Engine (GAE) as an example. AWS launched IaaS cloud computing in 2006, while Google argued that IaaS should not be the underlying layer of cloud computing. So, in 2008, Google launched a representative cloud computing product called GAE. For more information about GAE, please see Zhang Lei's article, A Decade of Container: Chronicle of Software Delivery.
Just like Lambda, GAE was eye-catching when it launched. However, developers soon found many limitations and turned back to IaaS.
The later PaaS products, such as Cloud Foundry, are more practical. The underlying IaaS is provided by cloud vendors, while the upper layer provides a set of application management ecosystems. The idea is still the same. Developers need to use cloud computing with PaaS instead of IaaS. It is worth noting that these products are still not serverless, thus making it necessary to consider maintenance, update, and scaling, and capacity planning.
Now, as the container technology becomes mature and the concept of Serverless develops further, PaaS and Serverless have also begun to merge. Such products have PaaS-like and Serverless-like features, such as fast delivery, smart elasticity, and lower cost. The typical product is SAE, launched by Alibaba Cloud in 2019.
First, SAE is a PaaS application. It is easy to use for most developers since there are many familiar concepts, such as application release, restart, grey release, environment variables, and configuration management.
Besides, SAE is also serverless. Users do not need to focus on, apply for, or maintain servers and install a bunch of tools. Instead, servers and resources are used on-demand and charged in pay-as-you-go mode. In combination with strong elasticity (timed elasticity and metric-based elasticity), extremely low costs can be achieved.
Finally, after the development of the container technology represented by Docker, SAE solved the prominent problems of traditional PaaS products, such as various restrictions and strong binding. Applications in any language can operate on SAE by relying on a container image.
Most developers may have gained a general understanding of the products that integrate PaaS and Serverless. According to the survey report on cloud-native users in China (2020), Serverless products of this type have been widely used.
Today, some in the industry may think the typical representative technology of cloud computing is Microservices, and the next generation is Serverless. It gives some people the impression that Serverless is more advanced than Microservices, and there would be no Microservices in the future, as the chart below shows:
Personally, the author thinks such assumption is generated because the Serverless concept is visualized in products like FC. In terms of Microservices, people may remind themselves of technical frameworks, such as SpringCloud and Dubbo. However, the Microservices concept is far beyond pure technical frameworks. There are also core supporting ideas for Microservices:
Therefore, if Microservices cannot be used in the Serverless era, many developers will feel confused or "resist the future."
Despite the various specific technical implementations, Serverless refers to a concept with no concern for the server and less usage of cloud computing services so it can coexist with Microservices without conflicts. Alibaba Cloud SAE integrates Microservices capabilities based on the Alibaba Cloud Microservice Engine (MSE). This means:
Therefore, for Serverless PaaS products, Serverless and Microservices are no longer antagonistic. Developers can continue using Microservices technologies and benefit from the smart elasticity and lower costs brought by Serverless simultaneously.
In terms of Serverless Function, Function Compute (FC) is a popular Serverless product and has been widely applied in various scenarios after years of development. It performs great in many scenarios, including frontend Serverless, multimedia processing, AI, event (like cloud product event and database changing event), and IoT messaging. Companies like Century Mart have fully-constructed their business on FC.
Many technical limitations from the early days have also been solved:
The following describes some typical scenarios that use FC.
After iterated with Ajax, Node.js, and React, the frontend formed a relatively mature technical system, especially Node.js. Node.js connects the frontend with the server.
Although frontend and backend developers can give full play to their advantages, there is a problem during collaboration. The backend developers usually provide interfaces for fields and services, while frontend developers provide specific data interfaces for users. Sometimes, a simple request may take a lot of effort because of the definition and coordination of both sides. Therefore, Backend for Frontend (BFF) is generated to specifically address the transformation issue between domain models and UI models.
However, the reality is that frontend developers need to learn the backend DevOps, high availability, and capacity planning for BFF, which are beyond their consideration. This demand was met in the Serverless era by changing BFF to Serverless for Frontend (SFF). Frontend developers only need to write a few functions, and then the Serverless platform will take over everything.
Server-Side Rendering (SSR) is very similar to SFF. After the work division, frontend developers were responsible for rendering, while backend developers only needed to write the interface. However, under the background of SEO friendliness and fast first screen rendering, SSR solution is used occasionally. By using Serverless, frontend developers can free themselves from the burden.
For many frontend products, such as mini programs and Yuque, frontend developers will complete full-stack development. Thus, Serverless technologies are used more frequently.
A complete ecosystem is expected to make good use of Serverless, including related frameworks, runtime, toolchains, and configuration specifications.
Nowadays, online education, livestreaming, short video, and other industries are booming. This gives rise to a lot of video demands, such as video processing, video editing, structuring, combination, transcoding, resolution adjustment, and client adaptation. Some typical scenarios are listed below:
AI Model Serving is a typical FC scenario. Once a model is trained, data scientists ask software engineers to convert it into a system or service. This process is called Model Serving. FC is free from O&M and elastic scaling, meeting the requirement of data scientists for a high-availability distributed system.
As a production-level container orchestration system, Kubernetes has become the de facto standard for container orchestration. It is widely used to automatically deploy, scale, and manage containerized applications. It also has corresponding Serverless Kubernetes products, such as Alibaba Cloud ASK and AWS Fargate. Users can directly deploy containerized applications without purchasing nodes. Also, users do not need to maintain nodes or plan capacity. Pay-as-you-go mode is applied based on the CPU and memory resources configured for applications. ASK clusters provide optimized compatibility with Kubernetes and lower the threshold to use Kubernetes. Developers can focus on the application program instead of the underlying infrastructure.
Serverless Kubernetes is a good choice for Kubernetes heavy users. Some typical customers and practices are listed below:
The products mentioned above are Serverless computing products, such as FC, SAE, and ASK. However, besides computing logic, the development process also has many other dependencies, such as storage and middleware. BaaS products provide API-based services. These APIs are generally used on-demand, free of O&M, and scaled automatically. So, these products are also serverless.
Typical products, like Alibaba Cloud Object Storage Service (OSS), support RESTful APIs, which are independent from the platform. They can store and access any data type anytime, anywhere, and from any application.
It is also worth mentioning the well-known middleware for developing enterprise-level applications. Taking Alibaba as an example, the technical architecture is also being upgraded fully-based on BaaS. The architecture aims to unify O&M, delivery, billing, and support modes, become out-of-the-box, and continuously improve productization.
To sum up, the aforementioned Serverless products cover all fields of frontend, backend, container, and BaaS. There are also many other Serverless products not mentioned in this article, such as CDN. Although the author disagrees with Berkeley's viewpoint of "Serverless = BaaS + FaaS," the author agrees with another viewpoint of Berkeley that says, "Serverless will dominate cloud computing."
Serverless is a concept, not a specific technology. In the future, once 99% of cloud products are serverless, cloud computing will follow. It is not a clear-cut change, but it comprehensively reduces costs for cloud users and improves the R&D efficiency of developers.
Chen Tao has ten years of experience in software development and four years of entrepreneurial experience, working for Taobao and DiDi. Chen focuses on cloud-native, Microservices, Serverless, and other technical fields. Chen has experience in cloud computing, e-commerce, and R&D, management, and business experience in entrepreneurship. Chen is currently working for Alibaba Cloud in the design and R&D of Serverless App Engine (SAE) on the cloud-native application platform.
Alibaba Clouder - June 8, 2020
Alibaba Clouder - January 4, 2021
Alibaba Developer - September 6, 2021
Alibaba Developer - February 3, 2020
Aliware - February 7, 2021
Alibaba Clouder - May 18, 2021
MSE provides a fully managed registration and configuration center, and gateway and microservices governance capabilities.Learn More
Provides a control plane to allow users to manage Kubernetes clusters that run based on different infrastructure resourcesLearn More
A secure image hosting platform providing containerized image lifecycle managementLearn More
A high-quality personalized recommendation service for your applications.Learn More
More Posts by Alibaba Cloud Native