×
Community Blog Six Years! Time to Understand Serverless Again | Discussions about Cloud-Native

Six Years! Time to Understand Serverless Again | Discussions about Cloud-Native

This article gives a thorough overview of Serverless from its inception to today.

By Chen Tao

Background

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.

1

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!

2

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.

Definition

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.

Rebirth of PaaS in the Serverless Era

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.

3

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.

Serverless App Engine (SAE)

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.

4

Microservices and Serverless

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:

5

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:

  1. Although Microservices increases the technical complexity to some extent, it reduces the complexity of the system and organization on a certain scale.
  2. As modern business systems become more complex, many business systems are designed based on the domain-driven design (DDD)supported by Microservices.

6

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:

  1. Applications deployed on Serverless platforms, such as SAE, can be developed via Microservices without any transformation.
  2. SAE has also enhanced many Microservices capabilities, including registry hosting and service governance. This further reduces the threshold and burden for developers to use Microservices.

7

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.

Function Compute (FC)

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:

  1. Most function compute products in the early days had restrictions on disk size, code package size, runtime, and memory specification. Alibaba Cloud FC has provided performance instances that handle these restrictions.
  2. Cold start can be fixed using reserved performance instances.

The following describes some typical scenarios that use FC.

Frontend Serverless

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.

8

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.

Multimedia Processing

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:

  • Hundreds of 1080P videos over 4 GB are generated every Friday. These videos need to be processed in a few hours on the same day.
  • More advanced customized processing demands are also possible. For example, after the video transcoding, the transcoding details need to be recorded in a database. Popular videos may also need to be automatically loaded to CDN to reduce workloads on the origin server.
  • In the Serverfull scenarios, a complex system is required to support these requirements, but FC makes everything easy.

9

AI Serverless

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.

Serverless Container - ASK

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:

  • Weibo can scale out 500 application instances in 30 seconds to deal with the Chinese New Year activities and hot events.
  • Megvii developed intelligent and O&M-free AI application platforms based on ASK.
  • Qutoutiao built Serverless big data computing platforms based on ASK.

BaaS

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.

Summary

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.

About the Author

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.

0 0 0
Share on

Aliware

51 posts | 4 followers

You may also like

Comments

Aliware

51 posts | 4 followers

Related Products