The concept of serverless has been put forward since 2012, and the real launch of relevant cloud products was the launch of lambda by AWS in 2014. If we compare serverless to a baby, it is already 6 years old.
Although there is no agreed definition of serverless in the industry, I believe that most developers will think of lambda when they hear serverless, and the keywords “function”, “charge on demand (call times)” and “event driven” will pop up. Indeed, serverless, which was just born in that year, is like the lovely “purple potato man” below. Purple is full of Mystery (it was definitely black technology when it was first launched in that year), which is impressive.
The tremendous influence of AWS and the black technology it carries really make people remember serverless, but it is also because it was so impressed at the time of its birth that many people are still impressed by serverless=lambda or serverless=fc (function compute), which is a pity.
Today, enterprises are undergoing comprehensive digital transformation. The entire technical architecture system is eager to obtain huge technical dividends by relying on cloud primordial. Serverless has been cloud primordial since its birth. Therefore, it is necessary for us to systematically understand the concept of serverless and related products born in recent years. We believe that whether you are a front-end, back-end, architect, SRE or CTO, you will gain something, And in the future, it can better play the technical value of serverless to help business success.
The industry has been trying to define serverless. For example, CNCF defines noops and pay as you run, and Berkeley says serverless=faas+baas. However, I would like to say that serverless does not need to be defined any more. It is already very clear: “server+less”. It is a concept. The core idea is that you no longer need to pay attention to server. As a contrast, in the IAAs era, you can buy servers, install various tools, and then develop your own business on it.
The server will not disappear, but will make ordinary developers no longer need to pay attention to the server, which means [intelligent elasticity], [fast delivery] and [lower cost], which are also typical features of serverless related products.
Therefore, there is no need to define serverless. It has been clearly described. We put aside the concept and take a specific look at the products in various specific technical fields. I believe you will have a more intuitive understanding.
3、 The rebirth of PAAS in the serverless Era
PAAS itself has a large concept. In a broad sense, it lies between IAAs and SaaS. Let’s start with a specific product: gae (Google App Engine). AWS launched IAAs cloud computing in 2006. Google believes that cloud computing should not be an underlying form like IAAs, so it launched its own cloud computing representative product gae in 2008 (for the development reason here, please refer to Zhang Lei’s article: ten years of containers, a chronicle of software delivery).
Gae, like lambda, which was launched at the beginning, was a bright spot, but developers soon found that it has many restrictions. In today’s words, it is a typical “I don’t want you to think, I want me to think”. The final result is that everyone has returned to the embrace of IAAs.
Later PAAS products, such as cloud foundry, are more practical. The underlying IAAs is still provided by cloud vendors, and the upper layer provides a set of application management ecology. The underlying idea is that developers do not want to use cloud computing through IAAs, but start with PAAS. However, it is not serverless. You still need to consider server maintenance, update, expansion, capacity planning, etc.
SAE（Serverless App Engine）
Now, with the maturity of the container technology and the further development of the serverless concept, PAAS and serverless concepts have also begun to integrate. Such products not only have the characteristics of “fast delivery” represented by PAAS, but also have the characteristics of “intelligent elasticity” and “lower cost” represented by serverless. The typical product representative is the product launched by Alibaba cloud in 2019: SAE (serverless App Engine).
First, it is a PAAS, and more specifically, it is an application PAAS. This means that most developers will be very natural to use, because you will be very familiar with the concepts, such as application release, restart, grayscale, environment variables, configuration management, etc.
At the same time, it is serverless. This means that you no longer need to care about the server, no longer need to apply for a machine, maintain the server, install a bunch of tools, but use it on demand, pay by minute, and realize the ultimate cost in combination with strong flexibility (timing flexibility, index flexibility).
Finally, thanks to the development of container technology represented by docker, SAE has solved the outstanding problems of classic PAAS (various restrictions and strong binding). Relying on container image, it can run applications in any language
Seeing this, I believe that most developers have an outline of the products combined with PAAS and serverless. In the survey report on native cloud users in China (2020), this form of serverless products began to be adopted by more and more developers.
On this basis, there is another topic worth discussing again, that is, microservices and serverless.
Microservices and serverless
Now the industry has some understanding about microservices and serverless: it thinks that the typical representative technology of cloud computing is microservices, and the representative technology of the next generation is serverless, which will make serverless more advanced than microservices, and even think that there will be no microservices in the future with serverless, similar to the following figure:
Personally, I think this recognition is due to the embodiment of the concept of serverless to products such as functional computing (FAAS). Now when we talk about microservices, we will think of the technical framework behind them, such as spring cloud and Dubbo. In fact, the word microservices has gone far beyond the scope of pure technical framework. It also has core supporting ideas behind it, including:
1 . Although microservices have increased the technical complexity to some extent, they will reduce the system complexity and organizational complexity under a certain scale.
2 . Modern business systems are becoming more and more complex. Many business systems will be designed based on Domain Driven Design (DDD). In fact, microservice is the supporting technology behind DDD.
Therefore, if microservices cannot be used in the serverless era, I believe many developers will feel overwhelmed or “resist the future”, because they will feel that someone has described a future for me, but they do not know how to go there.
Leaving aside various specific technical implementations and returning to the underlying philosophy, serverless represents a concept that does not need to pay attention to servers and reduces the use of cloud computing services, so it does not conflict with microservices and can coexist. Alibaba cloud’s SAE integrates the capability of microservices (relying on Alibaba cloud product MSE), which means:
1 . Applications deployed on serverless platforms such as SAE can continue to use microservice development without any transformation.
2 . SAE even provides many microservice capability enhancements, including registry hosting, service governance, etc., to further reduce the threshold and burden of developers using microservices.
Therefore, in serverless PAAS products, serverless and microservices are no longer antagonistic. Developers can continue to use microservice technology for development, and can also enjoy the “smart elasticity” and “lower cost” brought about by the serverless concept.
4、 Function calculation FC
After talking about serverless application, let’s take a look at serverless function, FC, as a serverless product “rooted in Miao Hong”, is believed to be familiar to everyone. After years of development, it has been used in front-end serverless, multimedia processing, AI and event scenarios (cloud product events, database change events, etc.) Scenarios such as Internet of things messages have been well applied, and even more and more companies have built their businesses entirely on FC, such as the serverless practice of Century Lianhua.
In addition, there are solutions for many early technical limitations:
1 . In the early days, most function computing products had limitations on disk size, code package size, runtime length, memory specification, etc. Alibaba cloud function computing introduced performance examples to basically solve these limitations.
2 . The reserved performance instance can be used to solve the cold start problem.
Now we will introduce some typical scenarios using FC
Front end serverless
After Ajax, nodejs, react and other technical iterations, the front end has formed a relatively mature technical system, especially nodejs, which connects the front end with the server.
The division of labor between the front-end and the back-end gives full play to their respective advantages, but there has always been a problem in the process of collaboration. The back-end students usually provide interfaces oriented to fields and services, but the front-end is a specific data interface oriented to users. Sometimes a simple requirement will take a long time because of the definitions and joint debugging of both sides. Therefore, a layer like BFF (backends for frontends) was born, which is developed by the user and is dedicated to the transformation of domain model UI model.
The ideal is very beautiful, and the reality is also very backbone. If the front-end students go to the BFF layer and find that they need to learn about the back-end Devops, high availability, capacity planning, etc., these are actually things that the front-end students do not want to care about. This demand has been well resolved in the serverless era. BFF has been changed into SFF (serverless for frontend). The front-end students only need to write a few functions, and the rest are handed over to the serverless platform
Similarly, there is server side rendering (SSR). Originally, after the front-end and back-end division of labor, the back-end only needs to write interfaces, and the front-end is responsible for rendering. However, under the background of SEO friendly and fast first screen rendering, sometimes the server side rendering scheme is used. Similarly, students using serverless front-end can play happily again.
In fact, in many front-end products (such as various small programs and YuQue products), the front-end students will complete the overall development in the whole stack, and more and more will use serverless related technologies
Of course, to make good use of serverless, you need a complete ecosystem, including related frameworks, runtime, tool chains, configuration specifications, etc. you can refer to Alibaba midway for this
Now online education, live broadcast, short video and other industries are booming, which has also spawned a lot of video demand, including video processing, including video editing, segmentation, combination, transcoding, resolution adjustment, client adaptation and so on. Typical scenarios include:
Every Friday, hundreds of 1080p large videos with 4G and above are regularly generated, but it is hoped that all of them will be processed in a few hours of the same day
You even have more advanced custom processing requirements. For example, after the video transcoding is completed, you need to record the transcoding details to the database, or after the transcoding is completed, you can automatically preheat the hot video to the CDN, so as to relieve the pressure on the source station.
In the serverfull scenario, you may need to build a complex system to support these demands, but if you use FC, you will find that everything becomes so simple.
AI model serving is a typical application scenario for function computing. After training the model, data scientists often need to find software engineers to turn the model into a system or service. This process is usually called model serving. The function computing has the characteristics of no operation and maintenance and elastic scaling, which is just in line with the demands of data scientists for highly available distributed systems.
5、 Serverless container -ask
As a production level container orchestration system, kubernetes has now become a de facto standard for container orchestration and is widely used to automatically deploy, expand and manage container applications. It also has corresponding serverless kubernetes products, such as Alibaba cloud ask and AWS fargate. In such products, you can directly deploy container applications without purchasing nodes, without node maintenance and capacity planning for the cluster, and pay on demand according to the CPU and memory resources configured by the application. Ask cluster provides complete kubernetes compatibility and lowers the threshold for using kubernetes, allowing you to focus more on applications rather than managing the underlying infrastructure.
If you are a heavy user of k8s, using serverless kubernetes is a good choice. Typical customer scenarios include:
Microblog: it can rapidly expand the capacity of 500 application instances within 30s to deal with cross year activities and hot events;
Kuangshi Technology: develop intelligent and operation free AI application platform based on ask;
Interesting headline: build a serverless big data computing platform based on ask.
All the above mentioned “computing” serverless products, such as FC, SAE, ask, etc., but we all know that the development process can not only rely on computing logic, but also many other dependencies, such as storage, middleware, etc. baas (backend-as-a-service) products provide API based services. These APIs are generally used on demand, free of operation and maintenance, and automatic capacity expansion, so they are also serverless.
A typical example is alicloud OSS, which has a platform independent restful API interface. It can store and access any type of data in any application, anytime and anywhere.
It is worth mentioning that there is also middleware that we are very familiar with when developing enterprise applications. Taking Alibaba as an example, we are also upgrading the 4.0 technical architecture. It is fully baas oriented, unified operation and maintenance, delivery, billing and support modes, out of the box, and the degree of productization continues to improve
To sum up, the series of serverless products mentioned above cover the front-end, back-end, container and baas fields, including many not mentioned above (such as CDN). In fact, they are serverless products, so I don’t agree with Berkeley’s view that serverless=baas+faas, but I very much agree with his other view: “serverless will dominate cloud computing”.
Serverless is first of all an idea, not a specific technology. When 99% of cloud products will be serverless one day in the future, cloud computing will be serverless. I think this change is not black or white, nor is it revolutionary to overturn the restart. It is to comprehensively reduce the cost of users using the cloud and comprehensively improve the R & D efficiency of developers.
About the author: Chen Tao,With 10 years of software development experience and 4 years of entrepreneurship experience, he has worked in Taobao and Didi, paid attention to cloud native, micro services, serverless and other technical fields, and accumulated R & D, management and business experience in cloud computing, e-commerce, and Entrepreneurship from 0 to 1. Currently, he works for Alibaba cloud and is engaged in the design and development of serverless application engine (SAE) on the cloud native application platform.
This article is the original content of Alibaba cloud and cannot be reproduced without permission.